package com.tashow.cloud.infra.controller.admin.redis.vo;

import java.util.List;
import java.util.Properties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

/** 管理后台 - Redis 监控信息 Response VO */
@Data
@Builder
@AllArgsConstructor
public class RedisMonitorRespVO {

  private Properties info;

  /** Redis key 数量" */
  private Long dbSize;

  /** CommandStat 数组 */
  private List<CommandStat> commandStats;

  /** Redis 命令统计结果 */
  @Data
  @Builder
  @AllArgsConstructor
  public static class CommandStat {

    /** Redis 命令" */
    private String command;

    /** 调用次数" */
    private Long calls;

    /** 消耗 CPU 秒数" */
    private Long usec;
  }
}
