cumulative_table.go - Overview
-
Overview This file contains functions for building ClickHouse queries for cumulative metrics to be displayed in a table format. It implements logic to handle cumulative metrics and calculates the rate of change over time.
-
Detailed Documentation
stepForTableCumulative(start, end int64) int64
- Purpose: Calculates an appropriate step size for querying cumulative metrics for table display.
- Parameters:
start
(int64): The start timestamp in milliseconds.end
(int64): The end timestamp in milliseconds.
- Returns: An integer representing the calculated step size in seconds.
buildMetricQueryForTable(start, end, _ int64, mq *v3.BuilderQuery) (string, error)
- Purpose: Builds a ClickHouse query for cumulative metrics to be displayed in a table format based on the provided parameters.
- Parameters:
start
(int64): The start timestamp in milliseconds.end
(int64): The end timestamp in milliseconds._
(int64): Unused parameter.mq
(*v3.BuilderQuery): The builder query containing query parameters.
- Returns: A string representing the ClickHouse query, or an error if building the query fails or the aggregation operator is unsupported.
Include in Getting Started: NO