Closed brancz closed 1 year ago
period type I assume should be cpu
"wallclock time" or "goroutine time" is probably a more suitable for the period type (sample type in pprof, right?)
Anyway, overall a PR for this would be super appreciated. I think I missed this because I was still new to the pprof format when I wrote this code. 🙇♂️
Period type is distinct from sample type. It's already SampleType: samples
and SampleUnit: count
for one of them and SampleType: time
and SampleUnit: nanoseconds
for the other. The period type and unit are intended to explain a measurement of events between sampled occurrences:
// The kind of events between sampled occurrences. // e.g [ "cpu","cycles" ] or [ "heap","bytes" ]
Since the observations by fgprof are done using a ticker, in principal similar to the stdlib CPU profile, I'd say we should probably be consistent with it.
I noticed a few more things that were unset. I think all of these should resolve those #17, #18, #19.
Closing this, since all related PRs have been merged.
I just noticed that the period type, period unit, and duration are not set in the resulting profiles created by fgprof. While not strictly required I feel it would be good to set them. Duration can be measured, and period type I assume should be
cpu
and period unit should benanoseconds
?