go(plot): track plotting execution time
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d2ab681218
commit
bec2ee3046
@ -6,6 +6,7 @@ package algo
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"git.dotya.ml/wanderer/math-optim/stats"
|
||||
"gonum.org/v1/gonum/floats"
|
||||
@ -20,6 +21,7 @@ const preferredFontStyle = "Mono"
|
||||
// violating the limit of 30, TODO(me): split this up.
|
||||
// nolint: gocognit
|
||||
func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string) {
|
||||
start := time.Now()
|
||||
pWidth := 13 * vg.Centimeter
|
||||
pHeight := 13 * vg.Centimeter
|
||||
|
||||
@ -95,7 +97,9 @@ func plotAllDims(algoStats []stats.Stats, fPrefix, fExt string) {
|
||||
fmt.Sprint(len(dim.Solution)) + "I" +
|
||||
fExt
|
||||
|
||||
info := "saving img to file: " + filename
|
||||
elapsed := time.Since(start)
|
||||
info := "saving img to file: " + filename +
|
||||
" [generated in " + fmt.Sprint(elapsed) + "]"
|
||||
|
||||
if s.Algo == "Random Search" {
|
||||
printRandomSearch(info)
|
||||
|
Loading…
Reference in New Issue
Block a user