Commit 99764d27 authored by antirez's avatar antirez
Browse files

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.
parent b5bd8f6a
...@@ -1131,8 +1131,8 @@ static void latencyMode(void) { ...@@ -1131,8 +1131,8 @@ static void latencyMode(void) {
#define LATENCY_DIST_GRAYS (LATENCY_DIST_MAX_GRAY-LATENCY_DIST_MIN_GRAY+1) #define LATENCY_DIST_GRAYS (LATENCY_DIST_MAX_GRAY-LATENCY_DIST_MIN_GRAY+1)
/* Gray palette. */ /* Gray palette. */
int spectrum_palette_size = 24; int spectrum_palette_size = 18;
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[] = {0, 233,235,237,239,241,243,245,247,144,143,142,184,226,214,208,202,196};
/* Structure to store samples distribution. */ /* Structure to store samples distribution. */
struct distsamples { struct distsamples {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment