package com.cameleer.server.core.admin;

public record ThresholdConfig(
        DatabaseThresholds database
) {
    public record DatabaseThresholds(
            int connectionPoolWarning,
            int connectionPoolCritical,
            double queryDurationWarning,
            double queryDurationCritical
    ) {
        public static DatabaseThresholds defaults() {
            return new DatabaseThresholds(80, 95, 1.0, 10.0);
        }
    }

    public static ThresholdConfig defaults() {
        return new ThresholdConfig(DatabaseThresholds.defaults());
    }
}
