mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
move out label copy and params copy to the outside of the loop
This commit is contained in:
parent
9be38e2421
commit
626934a059
|
@ -176,10 +176,10 @@ func (o *GridOptimizer) Run(executor Executor, configJson []byte) (map[string][]
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var labels = copyLabels(o.ParamLabels)
|
||||||
|
var currentParams = copyParams(o.CurrentParams)
|
||||||
for metricName, metricFunc := range valueFunctions {
|
for metricName, metricFunc := range valueFunctions {
|
||||||
var metricValue = metricFunc(summaryReport)
|
var metricValue = metricFunc(summaryReport)
|
||||||
var currentParams = copyParams(o.CurrentParams)
|
|
||||||
var labels = copyLabels(o.ParamLabels)
|
|
||||||
|
|
||||||
metrics[metricName] = append(metrics[metricName], Metric{
|
metrics[metricName] = append(metrics[metricName], Metric{
|
||||||
Params: currentParams,
|
Params: currentParams,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user