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 da8de67 commit cc755ebCopy full SHA for cc755eb
src/LinuxPerf.jl
@@ -666,6 +666,15 @@ isrun(counter::Counter) = counter.running > 0
666
fillrate(counter::Counter) = counter.running / counter.enabled
667
scaledcount(counter::Counter) = counter.value * (counter.enabled / counter.running)
668
669
+function checkstats(stats::Stats)
670
+ for group in stats.groups, counter in group
671
+ if !isrun(counter)
672
+ @warn "Some events are not measured"
673
+ return
674
+ end
675
676
+end
677
+
678
"""
679
@pstats [options] expr
680
@@ -742,6 +751,7 @@ macro pstats(args...)
742
751
# trick the compiler not to eliminate the code
743
752
stats = rand() < 0 ? val : Stats(bench)
744
753
close(bench)
754
+ checkstats(stats)
745
755
return stats::Stats
746
756
end)()
747
757
end
0 commit comments