1st
This commit is contained in:
@@ -333,11 +333,22 @@ func execQuery(conn *client.Connection, queryGenerator *RandomQueryGenerator, st
|
||||
}
|
||||
|
||||
case listInstantPeriods:
|
||||
since := time.Unix(int64(recipe.Since), 0)
|
||||
until := time.Unix(int64(recipe.Until), 0)
|
||||
//
|
||||
t1 := time.Now()
|
||||
_, err := conn.ListInstantPeriods(proto.ListInstantPeriodsReq{
|
||||
MetricID: recipe.MetricID,
|
||||
Since: recipe.Since,
|
||||
Until: recipe.Until,
|
||||
MetricID: recipe.MetricID,
|
||||
Since: proto.TimeBound{
|
||||
Year: since.Year(),
|
||||
Month: since.Month(),
|
||||
Day: since.Day(),
|
||||
},
|
||||
Until: proto.TimeBound{
|
||||
Year: until.Year(),
|
||||
Month: until.Month(),
|
||||
Day: until.Day(),
|
||||
},
|
||||
GroupBy: recipe.GroupBy,
|
||||
AggregateFuncs: diploma.AggregateMin | diploma.AggregateMax | diploma.AggregateAvg,
|
||||
})
|
||||
@@ -354,12 +365,23 @@ func execQuery(conn *client.Connection, queryGenerator *RandomQueryGenerator, st
|
||||
}
|
||||
|
||||
case listCumulativePeriods:
|
||||
since := time.Unix(int64(recipe.Since), 0)
|
||||
until := time.Unix(int64(recipe.Until), 0)
|
||||
//
|
||||
t1 := time.Now()
|
||||
_, err := conn.ListCumulativePeriods(proto.ListCumulativePeriodsReq{
|
||||
MetricID: recipe.MetricID,
|
||||
Since: recipe.Since,
|
||||
Until: recipe.Until,
|
||||
GroupBy: recipe.GroupBy,
|
||||
Since: proto.TimeBound{
|
||||
Year: since.Year(),
|
||||
Month: since.Month(),
|
||||
Day: since.Day(),
|
||||
},
|
||||
Until: proto.TimeBound{
|
||||
Year: until.Year(),
|
||||
Month: until.Month(),
|
||||
Day: until.Day(),
|
||||
},
|
||||
GroupBy: recipe.GroupBy,
|
||||
})
|
||||
elapsedTime = time.Since(t1)
|
||||
stat.ElapsedTime += elapsedTime
|
||||
|
||||
Reference in New Issue
Block a user