We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 312a868 commit c7b53b2Copy full SHA for c7b53b2
src/LinuxPerf.jl
@@ -645,6 +645,15 @@ isrun(counter::Counter) = counter.running > 0
645
fillrate(counter::Counter) = counter.running / counter.enabled
646
scaledcount(counter::Counter) = counter.value * (counter.enabled / counter.running)
647
648
+function checkstats(stats::Stats)
649
+ for group in stats.groups, counter in group
650
+ if !isrun(counter)
651
+ @warn "Some events are not measured"
652
+ return
653
+ end
654
655
+end
656
+
657
"""
658
@pstats [options] expr
659
@@ -721,6 +730,7 @@ macro pstats(args...)
721
730
# trick the compiler not to eliminate the code
722
731
stats = rand() < 0 ? val : Stats(bench)
723
732
close(bench)
733
+ checkstats(stats)
724
734
return stats::Stats
725
735
end)()
726
736
end
0 commit comments