go(stats): add explanatory comments [skip ci]
This commit is contained in:
parent
d2c4f2b1db
commit
3940036304
@ -11,6 +11,7 @@ import (
|
||||
"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{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user