diff --git a/stats/table.go b/stats/table.go index d52893f..728c044 100644 --- a/stats/table.go +++ b/stats/table.go @@ -11,6 +11,7 @@ "gonum.org/v1/gonum/stat" ) +// statsRow represents the header in the table. type statsHdr struct { Algo string BenchFuncName string @@ -19,6 +20,7 @@ type statsHdr struct { Iterations int } +// statsRow represents a single row in the table. type statsRow struct { Min float64 Max float64 @@ -76,6 +78,8 @@ func statsSingleFunc(singleFuncStats []Stats) { } } +// makeTableHdr fills the table header with passed information. +// TODO(me): add checks to assert only valid inputs are passed in. func makeTableHdr( algo, benchFuncName string, dimens, generations, iterations int, @@ -91,6 +95,7 @@ func makeTableHdr( return *hdr } +// newStatsHdr returns a pointer to a newly created statsHdr instance. func newStatsHdr() *statsHdr { return &statsHdr{} }