Skip to content

Commit

Permalink
Change time unit granularity in csv output from seconds to microseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Pocklington committed Dec 1, 2021
1 parent 5c14dae commit 7a8711d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion output/csv/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func MakeHeader(tags []string) []string {
// SampleToRow converts sample into array of strings
func SampleToRow(sample *stats.Sample, resTags []string, ignoredTags []string, row []string) []string {
row[0] = sample.Metric.Name
row[1] = fmt.Sprintf("%d", sample.Time.Unix())
row[1] = fmt.Sprintf("%d", sample.Time.UnixMicro())
row[2] = fmt.Sprintf("%f", sample.Value)
sampleTags := sample.Tags.CloneTags()

Expand Down

0 comments on commit 7a8711d

Please sign in to comment.