- name: PD_count:total
  category:
  - topology: true
  variables:
  - mean
  - min
  - max

- name: TiDB_count:total
  category:
  - topology: true
  variables:
  - mean
  - min
  - max

- name: TiKV_count:total
  category:
  - topology: true
  variables:
  - mean
  - min
  - max

- name: TiFlash_count:total
  category:
  - topology: true
  variables:
  - mean
  - min
  - max

- name: Read-rpc:total
  category:
  - workload: true
  variables:
  - mean
  - min
  - max

- name: Write-rpc:total
  category:
  - workload: true
  variables:
  - mean
  - min
  - max

- name: QPS_ddl:total
  category:
  - workload: true
  variables:
  - mean
  - min
  - max

# - name: QPS_other:total
#   category:
#   - workload: true
#   variables:
#   - mean
#   - min
#   - max

- name: Database_time:total
  category:
  - database_time: true
  variables:
  - mean
  - min
  - max

- name: Database_time:by_instance
  category:
  - database_time: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: Get_token_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: Parse_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: Compile_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: Execute_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: Database_time:by_type
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max
  - proportion

- name: SQL_execute_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: SQL_execute_time:by_type
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: Wait_start_TSO_time:total
  category:
  - database_time: false
  variables:
  - mean
  - min
  - max

- name: QPS:total
  category:
  - qps: true
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: QPS:by_instance
  category:
  - qps: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: QPS:by_instance
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: QPS:by_type
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: QPS_failed:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: CPS:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: CPS:by_type
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: Plan_cache_OPS:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: Plan_cache_miss_OPS:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: TPS:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: TPS:by_orthogonality
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: Transaction_retry_count:total
  category:
  - qps: false
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration:total
  category:
  - idle_duration: false
  - duration: true
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration:by_instance
  category:
  - duration: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: Avg_query_duration:by_instance
  category:
  - idle_duration: false
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration:by_type
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_get_token_duration:total
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_get_token_duration:by_instance
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_parse_duration:total
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_parse_duration:by_instance
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_compile_duration:total
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_compile_duration:by_instance
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_execute_duration:total
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_execute_duration:by_instance
  category:
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_idle_connection_duration_in_txn:total
  category:
  - idle_duration: true
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_idle_connection_duration_in_txn:by_instance
  category:
  - idle_duration: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: Avg_idle_connection_duration_not_in_txn:total
  category:
  - idle_duration: true
  - duration: false
  variables:
  - mean
  - min
  - max

- name: Avg_idle_connection_duration_not_in_txn:by_instance
  category:
  - idle_duration: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: Active_connection_count:total
  category:
  - active_connection: true
  variables:
  - mean
  - min
  - max

- name: Active_connection_count:by_instance
  category:
  - active_connection: true
  variables:
  - min_kv_avg
  - max_kv_avg

- name: Connnection_count:total
  category:
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: Connnection_count:by_instance
  category:
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: Disconnection_count_noOK:total
  category:
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: Disconnection_count:by_orthogonality
  category:
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: Active_connection_count:by_instance
  category:
  - active_connection: false
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration_read:total
  category:
  - duration: true
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration_read:by_instance
  category:
  - duration: true
  variables:
  - max_kv_avg
  - min_kv_avg
  
- name: Avg_query_duration_write:total
  category:
  - duration: true
  variables:
  - mean
  - min
  - max

- name: Avg_query_duration_write:by_instance
  category:
  - duration: true
  variables:
  - max_kv_avg
  - min_kv_avg

- name: TiDB_CPU_usage:by_instance
  category:
  - TiDB_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiDB_memory_usage:by_instance
  category:
  - TiDB_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_CPU_usage:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_memory_usage:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_disk_usage:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_IO_read_MBps:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_IO_write_MBps:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_CPU_usage:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_memory_usage:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_disk_usage:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_IO_read_MBps:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_IO_write_MBps:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: PD_CPU_usage:by_instance
  category:
  - PD_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: PD_memory_usage:by_instance
  category:
  - PD_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiDB_uptime:by_instance
  category:
  - TiDB_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiKV_uptime:by_instance
  category:
  - TiKV_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: TiFlash_uptime:by_instance
  category:
  - TiFlash_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: PD_uptime:by_instance
  category:
  - PD_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

- name: PD_uptime:by_instance
  category:
  - PD_source: true
  variables:
  - mean_mean
  - min_min
  - max_max

# added on 26th Sep
# true/false in category is not used on frontend now
- name: Avg_transaction_duration:total
  category:
  - txn_duration: true
  variables:
  - mean
  - min
  - max

- name: P90_transaction_duration:total
  category:
  - txn_duration: false
  variables:
  - mean

- name: P99_transaction_duration:total
  category:
  - txn_duration: false
  variables:
  - mean

- name: P90_idle_connection_duration_in_txn:total
  category:
  - idle_duration: false
  variables:
  - mean

- name: P99_idle_connection_duration_in_txn:total
  category:
  - idle_duration: false
  variables:
  - mean

- name: P90_idle_connection_duration_not_in_txn:total
  category:
  - idle_duration: false
  variables:
  - mean

- name: P99_idle_connection_duration_not_in_txn:total
  category:
  - idle_duration: false
  variables:
  - mean

- name: P90_query_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P99_query_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P90_get_token_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P99_get_token_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P90_parse_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P99_parse_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P90_compile_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P99_compile_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P90_execute_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: P99_execute_duration:total
  category:
  - duration: false
  variables:
  - mean

- name: Database_time:by_phase
  category:
  - database_time: False
  variables:
  - proportion