This commit is contained in:
2026-06-10 06:18:45 +03:00
parent 4089ca40c9
commit 9ec86282ad
47 changed files with 3493 additions and 4502 deletions

View File

@@ -5,7 +5,7 @@ import (
"log"
"time"
diploma "gordenko.dev/dima/qb"
"gordenko.dev/dima/qb"
"gordenko.dev/dima/qb/client"
"gordenko.dev/dima/qb/proto"
)
@@ -25,7 +25,7 @@ func sendRequests(conn *client.Connection) {
err = conn.AddMetric(proto.AddMetricReq{
MetricID: instantMetricID,
MetricType: diploma.Instant,
MetricType: qb.Instant,
FracDigits: fracDigits,
})
if err != nil {
@@ -114,8 +114,8 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByHour,
AggregateFuncs: diploma.AggregateMin | diploma.AggregateMax | diploma.AggregateAvg,
GroupBy: qb.GroupByHour,
AggregateFuncs: qb.AggregateMin | qb.AggregateMax | qb.AggregateAvg,
})
if err != nil {
log.Fatalf("conn.ListInstantPeriods: %s\n", err)
@@ -143,8 +143,8 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByDay,
AggregateFuncs: diploma.AggregateMin | diploma.AggregateMax | diploma.AggregateAvg,
GroupBy: qb.GroupByDay,
AggregateFuncs: qb.AggregateMin | qb.AggregateMax | qb.AggregateAvg,
})
if err != nil {
log.Fatalf("conn.ListInstantPeriods: %s\n", err)
@@ -172,8 +172,8 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByMonth,
AggregateFuncs: diploma.AggregateMin | diploma.AggregateMax | diploma.AggregateAvg,
GroupBy: qb.GroupByMonth,
AggregateFuncs: qb.AggregateMin | qb.AggregateMax | qb.AggregateAvg,
})
if err != nil {
log.Fatalf("conn.ListInstantPeriods: %s\n", err)
@@ -208,7 +208,7 @@ GetMetric:
err = conn.AddMetric(proto.AddMetricReq{
MetricID: cumulativeMetricID,
MetricType: diploma.Cumulative,
MetricType: qb.Cumulative,
FracDigits: fracDigits,
})
if err != nil {
@@ -298,7 +298,7 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByHour,
GroupBy: qb.GroupByHour,
})
if err != nil {
log.Fatalf("conn.ListCumulativePeriods: %s\n", err)
@@ -326,7 +326,7 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByDay,
GroupBy: qb.GroupByDay,
})
if err != nil {
log.Fatalf("conn.ListCumulativePeriods: %s\n", err)
@@ -354,7 +354,7 @@ GetMetric:
Month: until.Month(),
Day: until.Day(),
},
GroupBy: diploma.GroupByMonth,
GroupBy: qb.GroupByMonth,
})
if err != nil {
log.Fatalf("conn.ListCumulativePeriods: %s\n", err)