|
|
@@ -96,6 +96,11 @@ func ParseCloudCostViewRequest(qp httputil.QueryParams) (*ViewQueryRequest, erro
|
|
|
return nil, fmt.Errorf("error parsing 'sortBy': %w", err)
|
|
|
}
|
|
|
|
|
|
+ // includeCount controls whether the (potentially very expensive) NumResults
|
|
|
+ // count is computed alongside the combined cost. Defaults to true; callers
|
|
|
+ // pass includeCount=false to skip it.
|
|
|
+ includeCount := qp.GetBool("includeCount", true)
|
|
|
+
|
|
|
return &ViewQueryRequest{
|
|
|
QueryRequest: *qr,
|
|
|
CostMetricName: costMetricName,
|
|
|
@@ -104,6 +109,7 @@ func ParseCloudCostViewRequest(qp httputil.QueryParams) (*ViewQueryRequest, erro
|
|
|
Offset: offset,
|
|
|
SortDirection: order,
|
|
|
SortColumn: sortColumn,
|
|
|
+ SkipCount: !includeCount,
|
|
|
}, nil
|
|
|
}
|
|
|
|