@@ -35,9 +35,9 @@ class CPUProfile extends Profile {
3535 * Sum of all sample values at index 1 (total time in nanoseconds).
3636 */
3737 QlBuiltins:: BigInt sampleTimeSum ( ) {
38- result = sum ( Sample sample
38+ result = sum ( CPUSample sample
3939 | super .getSample ( _) = sample
40- | sample .getValue ( 1 )
40+ | sample .getTime ( )
4141 )
4242 }
4343
@@ -46,10 +46,10 @@ class CPUProfile extends Profile {
4646 */
4747 bindingset [ funcFullName]
4848 QlBuiltins:: BigInt cumTimeOfFunc ( string funcFullName ) {
49- result = sum ( Sample sample
49+ result = sum ( CPUSample sample
5050 | super .getSample ( _) = sample and
5151 sample .containsFunc ( funcFullName )
52- | sample .getValue ( 1 ) // time is at index 1
52+ | sample .getTime ( )
5353 )
5454 }
5555
@@ -60,11 +60,11 @@ class CPUProfile extends Profile {
6060 */
6161 bindingset [ funcFullName]
6262 QlBuiltins:: BigInt flatTimeOfFunc ( string funcFullName ) {
63- result = sum ( Sample sample
63+ result = sum ( CPUSample sample
6464 | super .getSample ( _) = sample and
6565 sample .containsFunc ( funcFullName ) and
6666 sample .getLocation ( 0 ) .getLine ( _) .getFunction ( ) .getName ( ) = funcFullName
67- | sample .getValue ( 1 ) // time is at index 1
67+ | sample .getTime ( )
6868 )
6969 }
7070
@@ -73,10 +73,10 @@ class CPUProfile extends Profile {
7373 */
7474 bindingset [ funcFullName, lineNumber]
7575 QlBuiltins:: BigInt cumTimeOfLine ( string funcFullName , int lineNumber ) {
76- result = sum ( Sample sample
76+ result = sum ( CPUSample sample
7777 | super .getSample ( _) = sample and
7878 sample .containsLine ( funcFullName , lineNumber )
79- | sample .getValue ( 1 ) // time is at index 1
79+ | sample .getTime ( )
8080 )
8181 }
8282
@@ -95,11 +95,11 @@ class CPUProfile extends Profile {
9595 */
9696 bindingset [ funcFullName, focusfuncFullName]
9797 QlBuiltins:: BigInt cumTimeUnderFunc ( string funcFullName , string focusfuncFullName ) {
98- result = sum ( Sample sample
98+ result = sum ( CPUSample sample
9999 | super .getSample ( _) = sample and
100100 sample .containsFunc ( funcFullName ) and
101101 sample .containsFunc ( focusfuncFullName )
102- | sample .getValue ( 1 )
102+ | sample .getTime ( )
103103 )
104104 }
105105
0 commit comments