Skip to main content

delta.go - Overview

  1. Overview This file provides functions for building ClickHouse queries specifically for delta metrics. Delta metrics represent the change in a value over a specific interval.

  2. Detailed Documentation

buildDeltaMetricQuery(start, end, step int64, mq *v3.BuilderQuery) (string, error)

  • Purpose: Constructs a ClickHouse query for delta metrics based on the provided parameters.
  • Parameters:
    • start (int64): The start timestamp in milliseconds.
    • end (int64): The end timestamp in milliseconds.
    • step (int64): The time step in seconds.
    • mq (*v3.BuilderQuery): The builder query containing query parameters.
  • Returns: A string representing the ClickHouse query, or an error if an unsupported aggregation operator is provided.

Include in Getting Started: NO