Skip to content

Commit 3eac545

Browse files
branczfelixge
authored andcommitted
Set Period to the number of nanoseconds between samples
1 parent 1badc5b commit 3eac545

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

format.go

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func toPprof(s map[string]int, hz int) *profile.Profile {
4949

5050
p := &profile.Profile{}
5151
m := &profile.Mapping{ID: 1, HasFunctions: true}
52+
p.Period = int64(1e9 / hz) // Number of nanoseconds between samples.
5253
p.Mapping = []*profile.Mapping{m}
5354
p.SampleType = []*profile.ValueType{
5455
{

0 commit comments

Comments
 (0)