Skip to content

Commit 29ceac9

Browse files
committed
Improved benchmarking suite
1 parent 02f68fd commit 29ceac9

3 files changed

Lines changed: 582 additions & 27 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ install: install-env-run install-env-docs install-env-test
3030
install-env-run:
3131
@echo "👷‍♂️ $(BLUE)creating virtual environment $(PROJECT)-run$(NC)"
3232
pyenv local --unset
33-
-pyenv virtualenv $(PROJECT)-run > /dev/null
33+
-pyenv virtualenv $(word 1,$(PYTHON_VERSIONS)) $(PROJECT)-run > /dev/null
3434
pyenv local $(PROJECT)-run
3535
pip install --no-user -U pip > /dev/null
3636
pip install --no-user -r requirements.txt > /dev/null
@@ -39,7 +39,7 @@ install-env-run:
3939
install-env-docs:
4040
@echo "👷‍♂️ $(BLUE)creating virtual environment $(PROJECT)-docs$(NC)"
4141
pyenv local --unset
42-
-pyenv virtualenv $(PROJECT)-docs > /dev/null
42+
-pyenv virtualenv $(word 1,$(PYTHON_VERSIONS)) $(PROJECT)-docs > /dev/null
4343
pyenv local $(PROJECT)-docs
4444
pip install --no-user -U pip > /dev/null
4545
pip install --no-user -r requirements.docs.txt > /dev/null

benchmarks/baseline.json

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
{
2+
"timestamp": "2026-01-08T18:57:53.373734",
3+
"name": "baseline",
4+
"metadata": {
5+
"num_values": 10000000,
6+
"num_trials": 5,
7+
"timestamp": "2026-01-08T18:57:53.373709"
8+
},
9+
"stats": [
10+
{
11+
"function": "profile_ddsketch.py:18(run_sketch_operations)",
12+
"ncalls": 1,
13+
"tottime": 1.565406003,
14+
"cumtime": 16.1225542324,
15+
"percall_tot": 1.565406003,
16+
"percall_cum": 16.1225542324
17+
},
18+
{
19+
"function": "core.py:77(insert)",
20+
"ncalls": 10000000,
21+
"tottime": 3.4180910396,
22+
"cumtime": 14.5549722284,
23+
"percall_tot": 3.418091039600001e-07,
24+
"percall_cum": 1.45549722284e-06
25+
},
26+
{
27+
"function": "contiguous.py:51(add)",
28+
"ncalls": 10000000,
29+
"tottime": 4.7022346094,
30+
"cumtime": 7.0226845072,
31+
"percall_tot": 4.7022346094000004e-07,
32+
"percall_cum": 7.022684507200001e-07
33+
},
34+
{
35+
"function": "logarithmic.py:12(compute_bucket_index)",
36+
"ncalls": 10000000,
37+
"tottime": 2.7030884928000005,
38+
"cumtime": 4.114196681600001,
39+
"percall_tot": 2.7030884928e-07,
40+
"percall_cum": 4.1141966816000005e-07
41+
},
42+
{
43+
"function": "contiguous.py:37(_get_position)",
44+
"ncalls": 10003320,
45+
"tottime": 1.7105854762,
46+
"cumtime": 2.3211455057999997,
47+
"percall_tot": 1.7100174287063457e-07,
48+
"percall_cum": 2.3203747022605352e-07
49+
},
50+
{
51+
"function": "~:0(<built-in method math.log>)",
52+
"ncalls": 10000001,
53+
"tottime": 0.7740575776,
54+
"cumtime": 0.7740575776,
55+
"percall_tot": 7.7405750019425e-08,
56+
"percall_cum": 7.7405750019425e-08
57+
},
58+
{
59+
"function": "~:0(<built-in method math.ceil>)",
60+
"ncalls": 10000000,
61+
"tottime": 0.6370525874000001,
62+
"cumtime": 0.6370525874000001,
63+
"percall_tot": 6.370525874000001e-08,
64+
"percall_cum": 6.370525874000001e-08
65+
},
66+
{
67+
"function": "~:0(<built-in method builtins.len>)",
68+
"ncalls": 10003337,
69+
"tottime": 0.6105629916,
70+
"cumtime": 0.6105629916,
71+
"percall_tot": 6.103591742666684e-08,
72+
"percall_cum": 6.103591742666684e-08
73+
},
74+
{
75+
"function": "core.py:128(quantile)",
76+
"ncalls": 4,
77+
"tottime": 0.000567737,
78+
"cumtime": 0.0021306240000000002,
79+
"percall_tot": 0.00014193425,
80+
"percall_cum": 0.0005326560000000001
81+
},
82+
{
83+
"function": "contiguous.py:181(get_count)",
84+
"ncalls": 3321,
85+
"tottime": 0.0008458188000000002,
86+
"cumtime": 0.0015443888,
87+
"percall_tot": 2.549099319598771e-07,
88+
"percall_cum": 4.6540709090191636e-07
89+
},
90+
{
91+
"function": "core.py:24(__init__)",
92+
"ncalls": 1,
93+
"tottime": 8.0284e-06,
94+
"cumtime": 4.5377e-05,
95+
"percall_tot": 8.0284e-06,
96+
"percall_cum": 4.5377e-05
97+
},
98+
{
99+
"function": "~:0(<method 'disable' of '_lsprof.Profiler' objects>)",
100+
"ncalls": 1,
101+
"tottime": 3.40906e-05,
102+
"cumtime": 3.40906e-05,
103+
"percall_tot": 3.40906e-05,
104+
"percall_cum": 3.40906e-05
105+
},
106+
{
107+
"function": "contiguous.py:19(__init__)",
108+
"ncalls": 2,
109+
"tottime": 9.3374e-06,
110+
"cumtime": 3.0868200000000004e-05,
111+
"percall_tot": 4.6687e-06,
112+
"percall_cum": 1.5434100000000002e-05
113+
},
114+
{
115+
"function": "~:0(<built-in method numpy.zeros>)",
116+
"ncalls": 2,
117+
"tottime": 1.95952e-05,
118+
"cumtime": 1.95952e-05,
119+
"percall_tot": 9.7976e-06,
120+
"percall_cum": 9.7976e-06
121+
},
122+
{
123+
"function": "logarithmic.py:18(compute_value_from_index)",
124+
"ncalls": 4,
125+
"tottime": 1.54358e-05,
126+
"cumtime": 1.8498200000000002e-05,
127+
"percall_tot": 3.85895e-06,
128+
"percall_cum": 4.6245500000000005e-06
129+
},
130+
{
131+
"function": "logarithmic.py:7(__init__)",
132+
"ncalls": 1,
133+
"tottime": 4.5042e-06,
134+
"cumtime": 6.4804000000000015e-06,
135+
"percall_tot": 4.5042e-06,
136+
"percall_cum": 6.4804000000000015e-06
137+
},
138+
{
139+
"function": "~:0(<built-in method math.pow>)",
140+
"ncalls": 4,
141+
"tottime": 3.0624000000000005e-06,
142+
"cumtime": 3.0624000000000005e-06,
143+
"percall_tot": 7.656000000000001e-07,
144+
"percall_cum": 7.656000000000001e-07
145+
},
146+
{
147+
"function": "base.py:17(__init__)",
148+
"ncalls": 2,
149+
"tottime": 1.9355999999999997e-06,
150+
"cumtime": 1.9355999999999997e-06,
151+
"percall_tot": 9.677999999999999e-07,
152+
"percall_cum": 9.677999999999999e-07
153+
}
154+
]
155+
}

0 commit comments

Comments
 (0)