Profiling
Returns count of execution and total execution time for MDX expression.
Function Profiling works with Mondrian's request profiling enabled. Available for Jira Server / Data Center since eazyBI version 6.5.0
Syntax
Profiling(String_Expression, Value_Expression)
Arguments
String_Expression | MDX expression that returns a string |
---|---|
Value_Expression | MDX expression that returns a number, a set, or a string. |
Examples
Here is an example formula using Profiling. It uses the function three times, profiling the total count and execution time of the measure, and then separate parts of it - profiling filter and measure usage separately.
Profiling("Issues created and resolved in period", NonZero( Sum( Filter( -- iterate through set of issues Descendants([Issue].CurrentHierarchyMember,[Issue].[Issue]), -- apply filter criteria to each issue Profiling("Filter", DateInPeriod( [Measures].[Issue created date], [Time].CurrentHierarchyMember ) AND DateInPeriod( [Measures].[Issue resolution date], [Time].CurrentHierarchyMember ) ) ), -- numeric expression - sum of relevant issues Profiling("Measure", [Measures].[Issues created] ) )))
Here are the profiling results for a measure Issues created and resolved in period in the example report Issues created and resolved in period % in our demo account.
During profiling, the report used only this measure. The example report profiling represents results on a clear cache:
Filter invoked 45425 times for total of 287ms. (Avg. 0ms/invocation)
DescendantsSet invoked 2 times for total of 1ms. (Avg. 0ms/invocation)
SumFunDef invoked 26 times for total of 482ms. (Avg. 18ms/invocation)
Issues created and resolved in period invoked 26 times for total of 482ms. (Avg. 18ms/invocation)
Measure invoked 346 times for total of 3ms. (Avg. 0ms/invocation)
FilterFunDef invoked 46 times for total of 476ms. (Avg. 10ms/invocation)
SqlStatement-SqlMemberSource.getMemberChildren invoked 1 times for total of 5ms. (Avg. 5ms/invocation)
SqlStatement-Segment.load invoked 1 times for total of 21ms. (Avg. 21ms/invocation)
SqlStatement-SqlTupleReader.readTuples [[Issue].[Issue]] invoked 1 times for total of 63ms. (Avg. 63ms/invocation)
Execution time: 521ms
Here are three profiling results related to the formula extracted from all profiling results visible above.
- Filter invoked 45425 times for total of 287ms. (Avg. 0ms/invocation)
- Issues created and resolved in period invoked 26 times for total of 482ms. (Avg. 18ms/invocation)
- Measure invoked 346 times for total of 3ms. (Avg. 0ms/invocation)
Filter is applied on all imported issues in the account for any selected period in the report (current and last 12 months). Measure is applied on a filtered set of issues only. Issues created and resolved in period represent executions for each selected period. Any expression is executed twice on the clear cache.