summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-02-13 12:44:40 +0100
committerantirez <antirez@gmail.com>2015-03-18 11:29:32 +0100
commit99764d27220ffee8c8b8adfe24b85baa7112b7bd (patch)
tree85a29bce67fb55ba941ec6d1fa08906276658493
parentb5bd8f6afeb446d81af0be267f823d4a1d97f799 (diff)
downloadredis-99764d27220ffee8c8b8adfe24b85baa7112b7bd.tar.gz
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.
-rw-r--r--src/redis-cli.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 2473b4f3b..1cc658297 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -1131,8 +1131,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 {