Skip to content

Commit

Permalink
removing indented json for now
Browse files Browse the repository at this point in the history
  • Loading branch information
mchinta7 committed Jan 11, 2024
1 parent bb2a7f6 commit f117b37
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions cmd/kperf/commands/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,24 +170,12 @@ func printResponseStats(f *os.File, rawDataFlagIncluded bool, stats *request.Res
Latencies: stats.Latencies,
TotalReceivedBytes: stats.TotalReceivedBytes,
}
if rawDataFlagIncluded {
output.Latencies = nil
}

encoder := json.NewEncoder(f)
err := encoder.Encode(output)
if err != nil {
return fmt.Errorf("failed to encode json: %w", err)
}

indentedJson, err := json.MarshalIndent(output, "", " ")
if err != nil {
panic(err)
}
_, err = f.Write(indentedJson)
if err != nil {
return fmt.Errorf("failed to write indented json to file: %w", err)
}

return nil
}

0 comments on commit f117b37

Please sign in to comment.