summaryrefslogtreecommitdiff
path: root/deps/hdr_histogram/Makefile
diff options
context:
space:
mode:
authoryoav-steinberg <yoav@monfort.co.il>2022-04-20 09:38:20 +0300
committerGitHub <noreply@github.com>2022-04-20 09:38:20 +0300
commit5075e74366c99033886bce13fcd504a2c57fa180 (patch)
treed968acc3d9843cc38f6c3963a44f515ee2c8b174 /deps/hdr_histogram/Makefile
parentaba2865c8680326e148ba6eb4cb6f6e7ab5119a3 (diff)
downloadredis-5075e74366c99033886bce13fcd504a2c57fa180.tar.gz
Optimized `hdr_value_at_percentile` (#10606)
`hdr_value_at_percentile()` is part of the Hdr_Histogram library used when generating `latencystats` report. There's a pending optimization for this function which greatly affects the performance of `info latencystats`. https://github.com/HdrHistogram/HdrHistogram_c/pull/107 This PR: 1. Upgrades the sources in _deps/hdr_histogram_ to the latest Hdr_Histogram version 0.11.5 2. Applies the referenced optimization. 3. Adds minor documentation about the hdr_histogram dependency which was missing under _deps/README.md_. benchmark on my machine: running: `redis-benchmark -n 100000 info latencystats` on a clean build with no data. | benchmark | RPS | | ---- | ---- | | before upgrade to v0.11.05 | 7,681 | | before optimization | 12,474 | | after optimization | 52,606 | Co-authored-by: filipe oliveira <filipecosta.90@gmail.com>
Diffstat (limited to 'deps/hdr_histogram/Makefile')
-rw-r--r--deps/hdr_histogram/Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/deps/hdr_histogram/Makefile b/deps/hdr_histogram/Makefile
index 64f2e547a..28dd93ea1 100644
--- a/deps/hdr_histogram/Makefile
+++ b/deps/hdr_histogram/Makefile
@@ -1,8 +1,8 @@
-STD=
+STD= -std=c99
WARN= -Wall
OPT= -Os
-R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS)
+R_CFLAGS= $(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) -DHDR_MALLOC_INCLUDE=\"hdr_redis_malloc.h\"
R_LDFLAGS= $(LDFLAGS)
DEBUG= -g
@@ -12,12 +12,10 @@ R_LD=$(CC) $(R_LDFLAGS)
AR= ar
ARFLAGS= rcs
-libhdrhistogram.a: hdr_histogram.o hdr_alloc.o
+libhdrhistogram.a: hdr_histogram.o
$(AR) $(ARFLAGS) $@ $+
-hdr_alloc.o: hdr_alloc.h hdr_alloc.c
-
-hdr_histogram.o: hdr_alloc.o hdr_histogram.h hdr_histogram.c
+hdr_histogram.o: hdr_histogram.h hdr_histogram.c
.c.o:
$(R_CC) -c $<