From 3101d2bffb9437a3a82920ef48c51955783a7070 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 13 Feb 2015 12:44:40 +0100 Subject: [PATCH] redis-cli --latency-dist, hopefully better palette. Less grays: more readable palette since usually we have a non linear distribution of percentages and very near gray tones are hard to take apart. Final part of the palette is gradient from yellow to red. The red part is hardly reached because of usual distribution of latencies, but shows up mainly when latencies are very high because of the logarithmic scale, this is coherent to what people expect: red = bad. --- src/redis-cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redis-cli.c b/src/redis-cli.c index 8db34bca..e8d4bce5 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1133,8 +1133,8 @@ static void latencyMode(void) { #define LATENCY_DIST_GRAYS (LATENCY_DIST_MAX_GRAY-LATENCY_DIST_MIN_GRAY+1) /* Gray palette. */ -int spectrum_palette_size = 24; -int spectrum_palette[] = {0, 233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255}; +int spectrum_palette_size = 18; +int spectrum_palette[] = {0, 233,235,237,239,241,243,245,247,144,143,142,184,226,214,208,202,196}; /* Structure to store samples distribution. */ struct distsamples {