package server

import (
	"github.com/prometheus/client_golang/prometheus"
)

var (
	AutoscaleRcuRunTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "autoscale_rcu_run_total",
			Help: "Total executions of RCU scale-down cron job.",
		}, []string{"job", "result"})

	AutoscaleRcuPoolTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "autoscale_rcu_pool_total",
			Help: "Total per-pool processing attempts in RCU scale-down.",
		}, []string{"shared_pool_id", "result"})

	AutoscaleRcuScaleDownTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "autoscale_rcu_scale_down_total",
			Help: "Total per-component RCU scale-down outcomes.",
		}, []string{"shared_pool_id", "scope", "component_type", "result"})

	AutoscaleRcuScaleUpTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "autoscale_rcu_scale_up_total",
			Help: "Total per-component RCU scale-up outcomes.",
		}, []string{"shared_pool_id", "trigger", "component_type", "result"})

	AutoscaleRcuBatchScaleTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "autoscale_rcu_batch_scale_total",
			Help: "Total batch scale submissions in RCU autoscale.",
		}, []string{"shared_pool_id", "result"})
)

func init() {
	prometheus.MustRegister(AutoscaleRcuRunTotal)
	prometheus.MustRegister(AutoscaleRcuPoolTotal)
	prometheus.MustRegister(AutoscaleRcuScaleDownTotal)
	prometheus.MustRegister(AutoscaleRcuScaleUpTotal)
	prometheus.MustRegister(AutoscaleRcuBatchScaleTotal)
}
