diff options
Diffstat (limited to 'examples/pf2.stp')
-rw-r--r-- | examples/pf2.stp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/pf2.stp b/examples/pf2.stp index 5773df97..fbac4e50 100644 --- a/examples/pf2.stp +++ b/examples/pf2.stp @@ -2,15 +2,15 @@ global profile, pcount probe timer.profile { - pcount ++ + pcount <<< 1 fn = probefunc () - if (fn != "") profile[fn] ++ # <<< 1 would be better ... + if (fn != "") profile[fn] <<< 1 } probe timer.ms(4000) { - printf ("\n--- %d samples recorded:\n", pcount) - foreach (f in profile- limit 10) { # ... but can only sort scalar arrays (bz #2305) - printf ("%s\t%d\n", f, profile[f]) + printf ("\n--- %d samples recorded:\n", @count(pcount)) + foreach (f in profile- limit 10) { + printf ("%s\t%d\n", f, @count(profile[f])) } delete profile - pcount = 0 + delete pcount } |