Skip to content

Commit

Permalink
perf: retrieve unsorted metrics (#3148)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc authored Jul 24, 2024
1 parent 64e4ecd commit 24bd8bb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/database/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ func (c *Client) GetLPUsageMetricsByMachineID(machineId string) ([]*ent.Metric,
metric.GeneratedByEQ(machineId),
metric.PushedAtIsNil(),
).
// XXX: do we need to sort?
Order(ent.Desc(metric.FieldReceivedAt)).
All(c.CTX)
if err != nil {
c.Log.Warningf("GetLPUsageMetricsByOrigin: %s", err)
Expand All @@ -49,7 +47,6 @@ func (c *Client) GetBouncerUsageMetricsByName(bouncerName string) ([]*ent.Metric
metric.GeneratedByEQ(bouncerName),
metric.PushedAtIsNil(),
).
Order(ent.Desc(metric.FieldReceivedAt)).
All(c.CTX)
if err != nil {
c.Log.Warningf("GetBouncerUsageMetricsByName: %s", err)
Expand Down

0 comments on commit 24bd8bb

Please sign in to comment.