Skip to content

Commit 773aa4c

Browse files
committed
update framecount
1 parent 09a6e11 commit 773aa4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/metrics/metrics.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,7 @@ func runPerf(myTarget target.Target, noRoot bool, processes []Process, cmd *exec
12281228
// The first duration needs to be longer than the time it takes for perf to print its first line of output.
12291229
t1 := time.NewTimer(time.Duration(2 * flagPerfPrintInterval * 1000))
12301230
var frameTimestamp float64
1231+
frameCount := 0
12311232
stopAnonymousFuncChannel := make(chan bool)
12321233
go func() {
12331234
stop := false
@@ -1245,6 +1246,10 @@ func runPerf(myTarget target.Target, noRoot bool, processes []Process, cmd *exec
12451246
outputLines = [][]byte{} // empty it
12461247
continue
12471248
}
1249+
for i := range metricFrames {
1250+
frameCount += 1
1251+
metricFrames[i].FrameCount = frameCount
1252+
}
12481253
// send the metrics frames out to be printed
12491254
frameChannel <- metricFrames
12501255
// write the events to a file

0 commit comments

Comments
 (0)