Skip to content

Commit

Permalink
Standardize short name for standard deviation
Browse files Browse the repository at this point in the history
  • Loading branch information
bhperry committed Aug 18, 2024
1 parent c96702a commit dd51a0d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/benchmark/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ func NewStats(name string, duration time.Duration, frames int, frameSeconds []in
if len(fps) > 0 {
stats.MinFPS = slices.Min(fps)
stats.MaxFPS = slices.Max(fps)
stats.StdDevFPS = standardDeviation(fps)
stats.StdevFPS = standardDeviation(fps)
}

return stats
}

// Stats stores data about the performance of a benchmark run
type Stats struct {
Name string `json:"name"`
AvgFPS float64 `json:"avgFPS"`
MinFPS float64 `json:"minFPS"`
MaxFPS float64 `json:"maxFPS"`
StdDevFPS float64 `json:"stddevFPS"`
Name string `json:"name"`
AvgFPS float64 `json:"avgFPS"`
MinFPS float64 `json:"minFPS"`
MaxFPS float64 `json:"maxFPS"`
StdevFPS float64 `json:"stdevFPS"`

Frames int `json:"frames"`
Duration time.Duration `json:"duration"`
Expand All @@ -61,7 +61,7 @@ func (s *Stats) Print() {
fmt.Fprintf(w, " Avg:\t%v\n", roundFloat(s.AvgFPS, 2))
fmt.Fprintf(w, " Min:\t%v\n", roundFloat(s.MinFPS, 2))
fmt.Fprintf(w, " Max:\t%v\n", roundFloat(s.MaxFPS, 2))
fmt.Fprintf(w, " Stdev:\t%v\n", roundFloat(s.StdDevFPS, 2))
fmt.Fprintf(w, " Stdev:\t%v\n", roundFloat(s.StdevFPS, 2))
w.Flush()
}

Expand Down

0 comments on commit dd51a0d

Please sign in to comment.