定义数字量化缩写方案,在 indicator/*.yml 中通过 number-format 字段引用。
number-format
# 规则名: # 阈值: 后缀 规则名: 1000: "K" 1000000: "M" 1000000000: "B"
当数值达到或超过阈值时使用对应后缀,精度由指示器的 decimal-places 控制。
decimal-places
compact: 1000: "K" # 1234 → "1.2K" 1000000: "M" # 1234567 → "1.2M" 1000000000: "B" # 1234567890 → "1.2B"
在指示器配置中引用:
default: number-format: compact # 引用上面定义的规则名 decimal-places: 1 # 保留 1 位小数
后缀字符串(YAML 值)支持嵌入 PAPI 占位符,例如 1000: "%server_name%_K" 将在加载时解析并固定为对应值。
1000: "%server_name%_K"
There was an error while loading. Please reload this page.