package com.gcsc.connection.statistics.dto;

import java.util.List;

/**
 * 서비스별 통계 응답 DTO
 */
public record ServiceStatsResponse(
    List<ServiceRequestStats> serviceStats,
    List<ServiceResponseTimeRank> slowestServices,
    List<HourlyServiceTrend> hourlyTrend
) {

    public record ServiceRequestStats(
        Long serviceId,
        String serviceName,
        long totalRequests,
        long successCount,
        double successRate,
        double avgResponseTime
    ) {}

    public record ServiceResponseTimeRank(
        String serviceName,
        double avgResponseTime,
        long requestCount
    ) {}

    public record HourlyServiceTrend(
        int hour,
        String serviceName,
        long count
    ) {}
}
