Skip to content

Commit 7d4927f

Browse files
Update comment / default
1 parent be5e0cc commit 7d4927f

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

api/v1_metrics_apps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type GetAggregateAppMetricsRouteParams struct {
1212
}
1313

1414
type GetMetricsAppsQueryParams struct {
15-
Limit int `query:"limit" default:"100" validate:"min=1,max=1000"`
15+
Limit int `query:"limit" default:"500" validate:"min=1,max=1000"`
1616
}
1717

1818
type AppMetric struct {

api/v1_metrics_apps_unique.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ func (app *ApiServer) v1MetricsAppsUnique(c *fiber.Ctx) error {
146146
// When no app_name is provided, we need to ensure all buckets are included
147147
// by limiting apps per bucket rather than applying a global limit
148148
if queryParams.AppName == "" {
149-
// Collect all apps for each bucket, sorted by unique count
150149
type bucketAppResult struct {
151150
Timestamp string
152151
AppUniqueMetric
@@ -248,7 +247,7 @@ func (app *ApiServer) v1MetricsAppsUnique(c *fiber.Ctx) error {
248247
return result[i].UniqueCount > result[j].UniqueCount
249248
})
250249

251-
// Apply limit (for app_name case, or as final safeguard)
250+
// Apply limit
252251
if len(result) > queryParams.Limit {
253252
result = result[:queryParams.Limit]
254253
}

0 commit comments

Comments
 (0)