longest trace
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
||||||
"cloud.o-forge.io/core/oc-lib/tools"
|
"cloud.o-forge.io/core/oc-lib/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func GetPlannerNearestStart(start time.Time, planned map[tools.DataType]map[string]pricing.PricedItemITF) float64 {
|
func GetPlannerNearestStart(start time.Time, planned map[tools.DataType]map[string]pricing.PricedItemITF) float64 {
|
||||||
near := float64(-1) // unset sentinel
|
near := float64(-1) // unset sentinel
|
||||||
for _, items := range planned { // loop through the planned items
|
for _, items := range planned { // loop through the planned items
|
||||||
@@ -32,6 +32,7 @@ func GetPlannerLongestTime(planned map[tools.DataType]map[string]pricing.PricedI
|
|||||||
longestTime := float64(0)
|
longestTime := float64(0)
|
||||||
for _, priced := range planned[tools.PROCESSING_RESOURCE] {
|
for _, priced := range planned[tools.PROCESSING_RESOURCE] {
|
||||||
longestTime += priced.GetExplicitDurationInS()
|
longestTime += priced.GetExplicitDurationInS()
|
||||||
|
fmt.Println("Longest", longestTime)
|
||||||
}
|
}
|
||||||
return longestTime
|
return longestTime
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user