process_query.go
process_query.go - Overview
-
Overview This file defines a
ProcessesTableListQuery
variable that holds a pre-configured query for fetching and displaying process-related metrics in a table format. The query is designed to retrieve CPU and memory usage data for processes. -
Detailed Documentation
ProcessesTableListQuery
- Purpose: Defines a composite query to fetch and display process CPU and memory usage in a table format.
- Type:
v3.QueryRangeParamsV3
- Fields:
CompositeQuery
: A pointer to av3.CompositeQuery
struct containing the details of the composite query.BuilderQueries
: A map ofv3.BuilderQuery
structs, each defining a sub-query."A"
: Query for CPU usage.QueryName
:"A"
DataSource
:v3.DataSourceMetrics
AggregateAttribute
: Specifies the CPU metric to aggregate.Key
: The CPU metric name (obtained frommetricNamesForProcesses["cpu"]
).DataType
:v3.AttributeKeyDataTypeFloat64
Temporality
:v3.Cumulative
Filters
: An empty filter set.GroupBy
: Groups the results by process ID.Key
: The process ID attribute key (processPIDAttrKey
).DataType
:v3.AttributeKeyDataTypeString
Type
:v3.AttributeKeyTypeResource
Expression
:"A"
ReduceTo
:v3.ReduceToOperatorAvg
TimeAggregation
:v3.TimeAggregationRate
SpaceAggregation
:v3.SpaceAggregationSum
Disabled
:true
"F1"
: Represents formatted CPU usage.QueryName
:"F1"
Expression
:"A"
Legend
:"Process CPU Usage (%)"
Filters
: An empty filter set.
"C"
: Query for memory usage.QueryName
:"C"
DataSource
:v3.DataSourceMetrics
AggregateAttribute
: Specifies the memory metric to aggregate.Key
: The memory metric name (obtained frommetricNamesForProcesses["memory"]
).DataType
:v3.AttributeKeyDataTypeFloat64
Temporality
:v3.Cumulative
Filters
: An empty filter set.GroupBy
: Groups the results by process ID.Key
: The process ID attribute key (processPIDAttrKey
).DataType
:v3.AttributeKeyDataTypeString
Type
:v3.AttributeKeyTypeResource
Expression
:"C"
ReduceTo
:v3.ReduceToOperatorAvg
TimeAggregation
:v3.TimeAggregationAvg
SpaceAggregation
:v3.SpaceAggregationSum
Disabled
:false
PanelType
:v3.PanelTypeTable
QueryType
:v3.QueryTypeBuilder
Version
:"v4"
FormatForWeb
:true
-
Code Examples None
-
Clarity and Accuracy The documentation is derived directly from the code and aims to accurately represent the structure and purpose of the defined query.
-
Markdown & MDX Perfection The markdown syntax is correct, and all special characters are properly escaped or enclosed in code blocks.
-
Edge Cases To Avoid Breaking MDX All potential MDX breaking cases are avoided.
-
Getting Started Relevance Include in Getting Started: NO