haveapi 0.30.2 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/benchmarks/Gemfile +30 -0
- data/benchmarks/Gemfile.lock +296 -0
- data/benchmarks/endpoints.rb +70 -14
- data/benchmarks/performance_compare.rb +112 -13
- data/benchmarks/shell.nix +21 -0
- data/doc/client-examples.md +81 -35
- data/doc/performance.md +99 -61
- data/haveapi.gemspec +1 -1
- data/lib/haveapi/client_examples/ts_generated_client.rb +36 -0
- data/lib/haveapi/documentation_clients.rb +49 -6
- data/lib/haveapi/version.rb +1 -1
- data/lib/haveapi/views/version_page.erb +2 -2
- data/spec/client_examples/profile_mount_spec.rb +45 -0
- data/spec/client_examples/ts_generated_client_spec.rb +53 -0
- data/spec/client_examples/typescript_profiles_spec.rb +113 -0
- data/spec/documentation/client_examples_spec.rb +2 -2
- data/spec/performance/comparator_spec.rb +136 -6
- data/spec/performance/event_baseline_spec.rb +156 -28
- data/spec/performance/release_lineage_spec.rb +53 -14
- data/spec/performance/runner_spec.rb +134 -0
- metadata +9 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92be099fb88d7c03896cb0d40205830260f93959987227c2d793a31012e6917f
|
|
4
|
+
data.tar.gz: 06c2e32b9c92d68ff32cfbe5f43ae9c22fb360a0d8bfb365ead9a48080001348
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3cb01c43beac90a8a095eded1edb417a32090ef7149fcd65da86d6d31da0cb54a2eb79f57e2ed2a456f5fd9f1d5bc7916551e88d0856b5d09fb5a1b0e0bba95
|
|
7
|
+
data.tar.gz: 610e4b8bc84dc86b6a03db3bcfac4bdedf8512482e76cfe2b3b8013cfc33fdb4367055cc546ada82ac1153342c742cbfe1f42b7efb466a3239aab5595352f5b3
|
data/benchmarks/Gemfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
ruby '3.4.11'
|
|
4
|
+
|
|
5
|
+
# Third-party benchmark tools only; measured HaveAPI comes from exported roots.
|
|
6
|
+
gem 'activerecord', '= 8.1.4'
|
|
7
|
+
gem 'activesupport', '= 8.1.4'
|
|
8
|
+
gem 'faraday', '= 2.15.0'
|
|
9
|
+
gem 'fiddle', '= 1.1.8'
|
|
10
|
+
gem 'highline', '= 3.1.2'
|
|
11
|
+
gem 'i18n', '= 1.15.2'
|
|
12
|
+
gem 'json', '= 2.21.2'
|
|
13
|
+
gem 'mail', '= 2.9.1'
|
|
14
|
+
gem 'nesty', '= 1.0.2'
|
|
15
|
+
gem 'rack-oauth2', '= 2.2.1'
|
|
16
|
+
gem 'rack-test', '= 2.3.0'
|
|
17
|
+
gem 'rackup', '= 2.3.1'
|
|
18
|
+
gem 'rake', '= 13.4.2'
|
|
19
|
+
gem 'redcarpet', '= 3.6.1'
|
|
20
|
+
gem 'require_all', '= 2.0.0'
|
|
21
|
+
gem 'rest-client', '= 2.1.0'
|
|
22
|
+
gem 'rspec', '= 3.13.2'
|
|
23
|
+
gem 'ruby-progressbar', '= 1.13.0'
|
|
24
|
+
gem 'sinatra', '= 4.2.1'
|
|
25
|
+
gem 'sinatra-activerecord', '= 2.0.28'
|
|
26
|
+
gem 'sinatra-contrib', '= 4.2.1'
|
|
27
|
+
gem 'sqlite3', '= 2.10.1'
|
|
28
|
+
gem 'tilt', '= 2.9.0'
|
|
29
|
+
gem 'tomlrb', '= 2.0.5'
|
|
30
|
+
gem 'webrick', '= 1.9.2'
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
activemodel (8.1.4)
|
|
5
|
+
activesupport (= 8.1.4)
|
|
6
|
+
activerecord (8.1.4)
|
|
7
|
+
activemodel (= 8.1.4)
|
|
8
|
+
activesupport (= 8.1.4)
|
|
9
|
+
timeout (>= 0.4.0)
|
|
10
|
+
activesupport (8.1.4)
|
|
11
|
+
base64
|
|
12
|
+
bigdecimal
|
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
14
|
+
connection_pool (>= 2.2.5)
|
|
15
|
+
drb
|
|
16
|
+
i18n (>= 1.6, < 2)
|
|
17
|
+
json
|
|
18
|
+
logger (>= 1.4.2)
|
|
19
|
+
minitest (>= 5.1)
|
|
20
|
+
securerandom (>= 0.3)
|
|
21
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
|
+
uri (>= 0.13.1)
|
|
23
|
+
aes_key_wrap (1.1.0)
|
|
24
|
+
attr_required (1.0.2)
|
|
25
|
+
base64 (0.3.0)
|
|
26
|
+
bigdecimal (4.1.3)
|
|
27
|
+
bindata (3.0.1)
|
|
28
|
+
concurrent-ruby (1.3.8)
|
|
29
|
+
connection_pool (3.0.2)
|
|
30
|
+
date (3.6.0)
|
|
31
|
+
diff-lcs (1.6.2)
|
|
32
|
+
domain_name (0.7.20261007)
|
|
33
|
+
drb (2.2.3)
|
|
34
|
+
faraday (2.15.0)
|
|
35
|
+
faraday-net_http (>= 2.0, < 3.6)
|
|
36
|
+
json
|
|
37
|
+
logger
|
|
38
|
+
faraday-follow_redirects (0.5.0)
|
|
39
|
+
faraday (>= 1, < 3)
|
|
40
|
+
faraday-net_http (3.5.0)
|
|
41
|
+
net-http (~> 0.5)
|
|
42
|
+
fiddle (1.1.8)
|
|
43
|
+
highline (3.1.2)
|
|
44
|
+
reline
|
|
45
|
+
http-accept (1.7.0)
|
|
46
|
+
http-cookie (1.1.6)
|
|
47
|
+
domain_name (~> 0.5)
|
|
48
|
+
i18n (1.15.2)
|
|
49
|
+
concurrent-ruby (~> 1.0)
|
|
50
|
+
io-console (0.9.4)
|
|
51
|
+
json (2.21.2)
|
|
52
|
+
json-jwt (1.17.2)
|
|
53
|
+
activesupport (>= 4.2)
|
|
54
|
+
aes_key_wrap
|
|
55
|
+
base64
|
|
56
|
+
bindata
|
|
57
|
+
faraday (~> 2.0)
|
|
58
|
+
faraday-follow_redirects
|
|
59
|
+
logger (1.7.0)
|
|
60
|
+
mail (2.9.1)
|
|
61
|
+
logger
|
|
62
|
+
mini_mime (>= 0.1.1)
|
|
63
|
+
net-imap
|
|
64
|
+
net-pop
|
|
65
|
+
net-smtp
|
|
66
|
+
mime-types (3.7.0)
|
|
67
|
+
logger
|
|
68
|
+
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
69
|
+
mime-types-data (3.2026.1020)
|
|
70
|
+
mini_mime (1.1.5)
|
|
71
|
+
minitest (6.0.6)
|
|
72
|
+
drb (~> 2.0)
|
|
73
|
+
prism (~> 1.5)
|
|
74
|
+
multi_json (1.21.2)
|
|
75
|
+
mustermann (3.1.1)
|
|
76
|
+
nesty (1.0.2)
|
|
77
|
+
net-http (0.10.0)
|
|
78
|
+
net-protocol (>= 0.3.0)
|
|
79
|
+
uri (>= 0.11.1)
|
|
80
|
+
net-imap (0.6.8)
|
|
81
|
+
date
|
|
82
|
+
net-protocol
|
|
83
|
+
net-pop (0.1.2)
|
|
84
|
+
net-protocol
|
|
85
|
+
net-protocol (0.4.0)
|
|
86
|
+
timeout
|
|
87
|
+
net-smtp (0.5.2)
|
|
88
|
+
net-protocol
|
|
89
|
+
netrc (0.11.0)
|
|
90
|
+
prism (1.9.0)
|
|
91
|
+
racc (1.8.1)
|
|
92
|
+
rack (3.2.7)
|
|
93
|
+
rack-oauth2 (2.2.1)
|
|
94
|
+
activesupport
|
|
95
|
+
attr_required
|
|
96
|
+
faraday (~> 2.0)
|
|
97
|
+
faraday-follow_redirects
|
|
98
|
+
json-jwt (>= 1.11.0)
|
|
99
|
+
rack (>= 2.1.0)
|
|
100
|
+
rack-protection (4.2.1)
|
|
101
|
+
base64 (>= 0.1.0)
|
|
102
|
+
logger (>= 1.6.0)
|
|
103
|
+
rack (>= 3.0.0, < 4)
|
|
104
|
+
rack-session (2.1.2)
|
|
105
|
+
base64 (>= 0.1.0)
|
|
106
|
+
rack (>= 3.0.0)
|
|
107
|
+
rack-test (2.3.0)
|
|
108
|
+
rack (>= 1.3)
|
|
109
|
+
rackup (2.3.1)
|
|
110
|
+
rack (>= 3)
|
|
111
|
+
rake (13.4.2)
|
|
112
|
+
redcarpet (3.6.1)
|
|
113
|
+
reline (0.7.0)
|
|
114
|
+
io-console (~> 0.5)
|
|
115
|
+
require_all (2.0.0)
|
|
116
|
+
rest-client (2.1.0)
|
|
117
|
+
http-accept (>= 1.7.0, < 2.0)
|
|
118
|
+
http-cookie (>= 1.0.2, < 2.0)
|
|
119
|
+
mime-types (>= 1.16, < 4.0)
|
|
120
|
+
netrc (~> 0.8)
|
|
121
|
+
rspec (3.13.2)
|
|
122
|
+
rspec-core (~> 3.13.0)
|
|
123
|
+
rspec-expectations (~> 3.13.0)
|
|
124
|
+
rspec-mocks (~> 3.13.0)
|
|
125
|
+
rspec-core (3.13.6)
|
|
126
|
+
rspec-support (~> 3.13.0)
|
|
127
|
+
rspec-expectations (3.13.5)
|
|
128
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
129
|
+
rspec-support (~> 3.13.0)
|
|
130
|
+
rspec-mocks (3.13.8)
|
|
131
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
132
|
+
rspec-support (~> 3.13.0)
|
|
133
|
+
rspec-support (3.13.7)
|
|
134
|
+
ruby-progressbar (1.13.0)
|
|
135
|
+
securerandom (0.4.1)
|
|
136
|
+
sinatra (4.2.1)
|
|
137
|
+
logger (>= 1.6.0)
|
|
138
|
+
mustermann (~> 3.0)
|
|
139
|
+
rack (>= 3.0.0, < 4)
|
|
140
|
+
rack-protection (= 4.2.1)
|
|
141
|
+
rack-session (>= 2.0.0, < 3)
|
|
142
|
+
tilt (~> 2.0)
|
|
143
|
+
sinatra-activerecord (2.0.28)
|
|
144
|
+
activerecord (>= 4.1)
|
|
145
|
+
sinatra (>= 1.0)
|
|
146
|
+
sinatra-contrib (4.2.1)
|
|
147
|
+
multi_json (>= 0.0.2)
|
|
148
|
+
mustermann (~> 3.0)
|
|
149
|
+
rack-protection (= 4.2.1)
|
|
150
|
+
sinatra (= 4.2.1)
|
|
151
|
+
tilt (~> 2.0)
|
|
152
|
+
sqlite3 (2.10.1-aarch64-linux-gnu)
|
|
153
|
+
sqlite3 (2.10.1-aarch64-linux-musl)
|
|
154
|
+
sqlite3 (2.10.1-arm-linux-gnu)
|
|
155
|
+
sqlite3 (2.10.1-arm-linux-musl)
|
|
156
|
+
sqlite3 (2.10.1-arm64-darwin)
|
|
157
|
+
sqlite3 (2.10.1-x86-linux-gnu)
|
|
158
|
+
sqlite3 (2.10.1-x86-linux-musl)
|
|
159
|
+
sqlite3 (2.10.1-x86_64-darwin)
|
|
160
|
+
sqlite3 (2.10.1-x86_64-linux-gnu)
|
|
161
|
+
sqlite3 (2.10.1-x86_64-linux-musl)
|
|
162
|
+
tilt (2.9.0)
|
|
163
|
+
timeout (0.6.1)
|
|
164
|
+
tomlrb (2.0.5)
|
|
165
|
+
racc (~> 1.4)
|
|
166
|
+
tzinfo (2.0.6)
|
|
167
|
+
concurrent-ruby (~> 1.0)
|
|
168
|
+
uri (1.1.2)
|
|
169
|
+
webrick (1.9.2)
|
|
170
|
+
|
|
171
|
+
PLATFORMS
|
|
172
|
+
aarch64-linux-gnu
|
|
173
|
+
aarch64-linux-musl
|
|
174
|
+
arm-linux-gnu
|
|
175
|
+
arm-linux-musl
|
|
176
|
+
arm64-darwin
|
|
177
|
+
x86-linux-gnu
|
|
178
|
+
x86-linux-musl
|
|
179
|
+
x86_64-darwin
|
|
180
|
+
x86_64-linux-gnu
|
|
181
|
+
x86_64-linux-musl
|
|
182
|
+
|
|
183
|
+
DEPENDENCIES
|
|
184
|
+
activerecord (= 8.1.4)
|
|
185
|
+
activesupport (= 8.1.4)
|
|
186
|
+
faraday (= 2.15.0)
|
|
187
|
+
fiddle (= 1.1.8)
|
|
188
|
+
highline (= 3.1.2)
|
|
189
|
+
i18n (= 1.15.2)
|
|
190
|
+
json (= 2.21.2)
|
|
191
|
+
mail (= 2.9.1)
|
|
192
|
+
nesty (= 1.0.2)
|
|
193
|
+
rack-oauth2 (= 2.2.1)
|
|
194
|
+
rack-test (= 2.3.0)
|
|
195
|
+
rackup (= 2.3.1)
|
|
196
|
+
rake (= 13.4.2)
|
|
197
|
+
redcarpet (= 3.6.1)
|
|
198
|
+
require_all (= 2.0.0)
|
|
199
|
+
rest-client (= 2.1.0)
|
|
200
|
+
rspec (= 3.13.2)
|
|
201
|
+
ruby-progressbar (= 1.13.0)
|
|
202
|
+
sinatra (= 4.2.1)
|
|
203
|
+
sinatra-activerecord (= 2.0.28)
|
|
204
|
+
sinatra-contrib (= 4.2.1)
|
|
205
|
+
sqlite3 (= 2.10.1)
|
|
206
|
+
tilt (= 2.9.0)
|
|
207
|
+
tomlrb (= 2.0.5)
|
|
208
|
+
webrick (= 1.9.2)
|
|
209
|
+
|
|
210
|
+
CHECKSUMS
|
|
211
|
+
activemodel (8.1.4) sha256=9a0906c127bd118aa5f06157db12b8f750da83dccee72db2f658547a0ae7a0e8
|
|
212
|
+
activerecord (8.1.4) sha256=3b4957ea7f246c9231bd7faa909312eac03a9101aaf87977b6c52733ff00b04f
|
|
213
|
+
activesupport (8.1.4) sha256=891dd3fe43c4fc8391934b237b1189bb1f661c932a84a840043db9d46a4e80df
|
|
214
|
+
aes_key_wrap (1.1.0) sha256=b935f4756b37375895db45669e79dfcdc0f7901e12d4e08974d5540c8e0776a5
|
|
215
|
+
attr_required (1.0.2) sha256=f0ebfc56b35e874f4d0ae799066dbc1f81efefe2364ca3803dc9ea6a4de6cb99
|
|
216
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
217
|
+
bigdecimal (4.1.3) sha256=61ebe1e5e559bdc3cc6f2c0ee7f427321fc838f59611c294356eb04d6e21cf66
|
|
218
|
+
bindata (3.0.1) sha256=e97a826a12f6e7c5847e983e5826f277d61035317d352ec339b079537f2fa466
|
|
219
|
+
bundler (4.0.23) sha256=407ba8a1d928f412847f819aa5f8b6aef7c59fb51feb517112af8a165487287b
|
|
220
|
+
concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
|
|
221
|
+
connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
|
|
222
|
+
date (3.6.0) sha256=18ac945c4e24ebd93534f8eab8c2fd8c5604b3e977105b3798d62a1e8d27b580
|
|
223
|
+
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
|
|
224
|
+
domain_name (0.7.20261007) sha256=0976c6ab837dbde991b433d03acc38fdb91fa8839df31a1ed75ce0318dc0441c
|
|
225
|
+
drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
|
|
226
|
+
faraday (2.15.0) sha256=3be0eff0187ed913a1b4f679e9fcfe845b542cdd4f75b76cd6181a4ae1335fff
|
|
227
|
+
faraday-follow_redirects (0.5.0) sha256=5cde93c894b30943a5d2b93c2fe9284216a6b756f7af406a1e55f211d97d10ad
|
|
228
|
+
faraday-net_http (3.5.0) sha256=2e7094c34e38754ee048cc3df47376f8657005d9375f8473bce1c3b526a22e36
|
|
229
|
+
fiddle (1.1.8) sha256=7fa8ee3627271497f3add5503acdbc3f40b32f610fc1cf49634f083ef3f32eee
|
|
230
|
+
highline (3.1.2) sha256=67cbd34d19f6ef11a7ee1d82ffab5d36dfd5b3be861f450fc1716c7125f4bb4a
|
|
231
|
+
http-accept (1.7.0) sha256=c626860682bfbb3b46462f8c39cd470fd7b0584f61b3cc9df5b2e9eb9972a126
|
|
232
|
+
http-cookie (1.1.6) sha256=ba4b82be64de61dc281243dac70e3c382c45142f20268ed9276a3670c93feaa9
|
|
233
|
+
i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
|
|
234
|
+
io-console (0.9.4) sha256=a403304f32928ee85e56d457b4612ca43f2703b561a3258844992bd24085fbb1
|
|
235
|
+
json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
|
|
236
|
+
json-jwt (1.17.2) sha256=97e37c1c3e22e9e1d74a1c0d77319c5cdc8a636226e5dbb1664b0b34eddcf1c9
|
|
237
|
+
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
238
|
+
mail (2.9.1) sha256=06574eca475253d6c18145dd70af80d0eb970182d55053497c5f4d797ea160e8
|
|
239
|
+
mime-types (3.7.0) sha256=dcebf61c246f08e15a4de34e386ebe8233791e868564a470c3fe77c00eed5e56
|
|
240
|
+
mime-types-data (3.2026.1020) sha256=6b3bcc776c1e3591267727700467e02fb9c12b503fcce4e0e964516d7c1e0d06
|
|
241
|
+
mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
|
|
242
|
+
minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
|
|
243
|
+
multi_json (1.21.2) sha256=245531eaf54bdba57aba515ff08b4503505c5e09911daa89c5a561e2f85bea8e
|
|
244
|
+
mustermann (3.1.1) sha256=4c6170c7234d5499c345562ba7c7dfe73e1754286dcc1abb053064d66a127198
|
|
245
|
+
nesty (1.0.2) sha256=1c6ee90b96d46d6dfad9ca1b91104e57c0f46dd24f2a186406026eb75833498b
|
|
246
|
+
net-http (0.10.0) sha256=1a2ff6e37a05724973c43f2bf7bf105f59c36a4cd0a7e9b1c021a0a566987c27
|
|
247
|
+
net-imap (0.6.8) sha256=eb30bb62227b64a3af6b518b04b2375113d69f68f15de59b0193b07d98acf6d9
|
|
248
|
+
net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3
|
|
249
|
+
net-protocol (0.4.0) sha256=f9f90c8c6f64794a45160bf422177a336db12809de3beeeaa26b88fcd2e8c853
|
|
250
|
+
net-smtp (0.5.2) sha256=35103cc04d6b2d94632f9928ede07483c24b70b9c0db1f231fea43909b678f3c
|
|
251
|
+
netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f
|
|
252
|
+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
253
|
+
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
254
|
+
rack (3.2.7) sha256=93e13e1c24f93556671d85d2d79fa228c3485815c50d7e2f265b5330c6528fb7
|
|
255
|
+
rack-oauth2 (2.2.1) sha256=c73aa87c508043e2258f02b4fb110cacba9b37d2ccf884e22487d014a120d1a5
|
|
256
|
+
rack-protection (4.2.1) sha256=cf6e2842df8c55f5e4d1a4be015e603e19e9bc3a7178bae58949ccbb58558bac
|
|
257
|
+
rack-session (2.1.2) sha256=595434f8c0c3473ae7d7ac56ecda6cc6dfd9d37c0b2b5255330aa1576967ffe8
|
|
258
|
+
rack-test (2.3.0) sha256=b118d177cc002c572fc1b6fd8d19c9ed5881a36e8d6f689f9e618f9f861241e8
|
|
259
|
+
rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
|
|
260
|
+
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
|
|
261
|
+
redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445
|
|
262
|
+
reline (0.7.0) sha256=5b012d8e55dbf9d450f12bde2cf7d15ff546ae80b3f8f3b30e570d431815583d
|
|
263
|
+
require_all (2.0.0) sha256=68d7b944b0f1c9898a16f9f102b448897c06fd2781d30efec19cbcf6e2164e6a
|
|
264
|
+
rest-client (2.1.0) sha256=35a6400bdb14fae28596618e312776c158f7ebbb0ccad752ff4fa142bf2747e3
|
|
265
|
+
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
|
|
266
|
+
rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
|
|
267
|
+
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
|
|
268
|
+
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
|
|
269
|
+
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
|
|
270
|
+
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
271
|
+
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
272
|
+
sinatra (4.2.1) sha256=b7aeb9b11d046b552972ade834f1f9be98b185fa8444480688e3627625377080
|
|
273
|
+
sinatra-activerecord (2.0.28) sha256=99f352c2dfa244d02b4f877efbe00135360b758390b8bb7bc2d4d91171c93811
|
|
274
|
+
sinatra-contrib (4.2.1) sha256=10d091c944d268aa910c618ea40a3c3ebe0533e6e32990d84af92235a3d26b4a
|
|
275
|
+
sqlite3 (2.10.1-aarch64-linux-gnu) sha256=48390cc2b809acd1280f5c9daaf3c2013833adb8a5ece9b0634f708651080ccd
|
|
276
|
+
sqlite3 (2.10.1-aarch64-linux-musl) sha256=db1bcddf98e4eeea80ca896f56aa3f9468364fa1ee8e042ddc6b628b5092fabb
|
|
277
|
+
sqlite3 (2.10.1-arm-linux-gnu) sha256=34a67a3fe84f705a0fad6f7aa4541579300644b9acdf414797e59929a6e3528b
|
|
278
|
+
sqlite3 (2.10.1-arm-linux-musl) sha256=e317adb8979b57dafd999b54410b4050296aa5d00caa664e3f75d876e2ae90e8
|
|
279
|
+
sqlite3 (2.10.1-arm64-darwin) sha256=45f74dad0a8ee57ae5fadfac39bf160d1f09fb0484a442223310d869cd957d92
|
|
280
|
+
sqlite3 (2.10.1-x86-linux-gnu) sha256=7b3f9eff7c5c26551800649312796203ded8a505bcdaf30cd915dd9ae5e9575c
|
|
281
|
+
sqlite3 (2.10.1-x86-linux-musl) sha256=8f193eb1b4a66156baaaedafac0de091533cf840f4b78cf3fa2019cde0388f10
|
|
282
|
+
sqlite3 (2.10.1-x86_64-darwin) sha256=00d1cd2e8ecff5ad9fffa0c97de59d4f85c5fc54eada2587d53ca0bd933b7a5d
|
|
283
|
+
sqlite3 (2.10.1-x86_64-linux-gnu) sha256=661ecede31e23a412059cd8c684ed84e332f64f167e4a90902cf99e8ea2c8718
|
|
284
|
+
sqlite3 (2.10.1-x86_64-linux-musl) sha256=67c7c5443a930157b4e148f0f4cb9ab998ee7ecfa8ce56879a6b56d1d742b2be
|
|
285
|
+
tilt (2.9.0) sha256=da5735d0280bba96e9a91041bb14aee435ccad5c17b0fa519249ae543d9aa3a5
|
|
286
|
+
timeout (0.6.1) sha256=78f57368a7e7bbadec56971f78a3f5ecbcfb59b7fcbb0a3ed6ddc08a5094accb
|
|
287
|
+
tomlrb (2.0.5) sha256=6e9a5e70a94a723842e770fcd14c49867703500d07cd03ebb6c343138a7b4477
|
|
288
|
+
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
289
|
+
uri (1.1.2) sha256=89292e98eabbef6248b0a0ed5e7e398e152f83f17560023a6d94a7f492b169fb
|
|
290
|
+
webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
|
|
291
|
+
|
|
292
|
+
RUBY VERSION
|
|
293
|
+
ruby 3.4.11
|
|
294
|
+
|
|
295
|
+
BUNDLED WITH
|
|
296
|
+
4.0.23
|
data/benchmarks/endpoints.rb
CHANGED
|
@@ -238,8 +238,15 @@ module HaveAPI
|
|
|
238
238
|
end
|
|
239
239
|
result.merge(spec).merge(stages:)
|
|
240
240
|
end
|
|
241
|
+
inputs = if @request['benchmark'] == true
|
|
242
|
+
self.class.inputs(source, @request.fetch('profile'), release: @request['release_versions'] == true, benchmark: true)
|
|
243
|
+
elsif @request['release_versions'] == true
|
|
244
|
+
self.class.inputs(source, @request.fetch('profile'), release: true)
|
|
245
|
+
else
|
|
246
|
+
self.class.inputs(source, @request.fetch('profile'))
|
|
247
|
+
end
|
|
241
248
|
{ schema_version: SAMPLE_SCHEMA, inventory:, cases: results, source: source_identity(source), environment: environment,
|
|
242
|
-
inputs
|
|
249
|
+
inputs:,
|
|
243
250
|
fixture_sha256: self.class.fixture_hashes,
|
|
244
251
|
runtime_policy: policy, workload_order: order, host: host_identity,
|
|
245
252
|
stages: { require_load_seconds: load_seconds, worker_seconds: monotonic - started } }
|
|
@@ -375,9 +382,10 @@ module HaveAPI
|
|
|
375
382
|
@progress.syswrite("#{JSON.generate(state:, workload: @current_workload, phase: @phase, iterations:)}\n")
|
|
376
383
|
end
|
|
377
384
|
|
|
378
|
-
def self.inputs(source, profile, release: false)
|
|
385
|
+
def self.inputs(source, profile, release: false, benchmark: false)
|
|
379
386
|
paths = %w[Gemfile flake.lock servers/ruby/Gemfile servers/ruby/haveapi.gemspec clients/ruby/Gemfile clients/ruby/haveapi-client.gemspec]
|
|
380
387
|
paths += %w[clients/rust/Gemfile clients/rust/haveapi-rust-client.gemspec]
|
|
388
|
+
paths += %w[.ruby-version flake.nix] if benchmark
|
|
381
389
|
raw_manifests = paths.to_h do |path|
|
|
382
390
|
target = File.join(source, path)
|
|
383
391
|
raise ContractError, "Missing dependency input #{target}" unless File.file?(target)
|
|
@@ -386,8 +394,7 @@ module HaveAPI
|
|
|
386
394
|
end
|
|
387
395
|
preparation = Release.json_preparation(raw_manifests)
|
|
388
396
|
manifests = raw_manifests.merge(preparation.fetch('normalized_contents')).transform_values { |text| Digest::SHA256.hexdigest(text) }
|
|
389
|
-
lock_paths = %w[Gemfile.lock servers/ruby/Gemfile.lock]
|
|
390
|
-
lock_paths << 'clients/rust/Gemfile.lock'
|
|
397
|
+
lock_paths = benchmark ? ['servers/ruby/benchmarks/Gemfile.lock'] : %w[Gemfile.lock servers/ruby/Gemfile.lock clients/rust/Gemfile.lock]
|
|
391
398
|
locks = lock_paths.to_h do |path|
|
|
392
399
|
target = File.join(ROOT, path)
|
|
393
400
|
raise ContractError, "Missing resolved lock #{target}" unless File.file?(target)
|
|
@@ -401,9 +408,19 @@ module HaveAPI
|
|
|
401
408
|
versions << HaveAPI::RustClient::VERSION
|
|
402
409
|
raise ContractError, 'Wrong loaded local package version' unless versions.all? { |version| version == receipt.fetch('own_version') }
|
|
403
410
|
|
|
404
|
-
|
|
411
|
+
result = { manifests: receipt.fetch('normalized_sha256'), locks:, release_versions: receipt }
|
|
412
|
+
else
|
|
413
|
+
result = { manifests:, locks:, json_preparation: preparation }
|
|
414
|
+
end
|
|
415
|
+
if benchmark
|
|
416
|
+
result[:manifests] = result.fetch(:manifests).except('flake.nix', 'flake.lock')
|
|
417
|
+
result[:contributor_flakes] = raw_manifests.slice('flake.nix', 'flake.lock').transform_values { |content| { 'content' => content } }
|
|
418
|
+
result[:benchmark] = BENCHMARK_INPUTS.to_h do |path|
|
|
419
|
+
content = File.read(File.join(ROOT, path))
|
|
420
|
+
[path, { 'content' => content, 'sha256' => Digest::SHA256.hexdigest(content) }]
|
|
421
|
+
end
|
|
405
422
|
end
|
|
406
|
-
|
|
423
|
+
result
|
|
407
424
|
end
|
|
408
425
|
|
|
409
426
|
def environment
|
|
@@ -451,6 +468,7 @@ module HaveAPI
|
|
|
451
468
|
end
|
|
452
469
|
return worker if @mode == 'worker'
|
|
453
470
|
|
|
471
|
+
comparison = { 'policy' => Comparator::POLICY, 'comparator_sha256' => Comparator::SOURCE_SHA256 }
|
|
454
472
|
parse
|
|
455
473
|
destination = File.expand_path(@options.fetch(:output))
|
|
456
474
|
raise ContractError, 'Output directory must not exist' if File.exist?(destination)
|
|
@@ -460,9 +478,16 @@ module HaveAPI
|
|
|
460
478
|
budget_path = @options.fetch(:budgets)
|
|
461
479
|
budgets = Identity.parse(File.read(budget_path))
|
|
462
480
|
digest = Digest::SHA256.file(budget_path).hexdigest
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
481
|
+
if @mode == 'run'
|
|
482
|
+
samples = run_samples(digest)
|
|
483
|
+
sample_bytes = JSON.pretty_generate(samples)
|
|
484
|
+
File.binwrite(File.join(@output, 'samples.json'), sample_bytes)
|
|
485
|
+
else
|
|
486
|
+
sample_bytes = File.binread(@options.fetch(:input))
|
|
487
|
+
end
|
|
488
|
+
comparison['samples_sha256'] = Digest::SHA256.hexdigest(sample_bytes)
|
|
489
|
+
samples = Identity.parse(sample_bytes) unless @mode == 'run'
|
|
490
|
+
report = Comparator.new(samples, budgets, budget_sha256: digest).compare.merge('comparison' => comparison)
|
|
466
491
|
File.write(File.join(@output, 'report.json'), JSON.pretty_generate(report))
|
|
467
492
|
puts JSON.generate(status: report.fetch('status'), report: File.join(@output, 'report.json'))
|
|
468
493
|
EXIT_CODES.fetch(report.fetch('status'))
|
|
@@ -470,7 +495,10 @@ module HaveAPI
|
|
|
470
495
|
report = { schema_version: SAMPLE_SCHEMA, status: 'error', error: { class: e.class.name, message: e.message } }
|
|
471
496
|
report[:error][:details] = e.details if e.is_a?(WorkerTimeout)
|
|
472
497
|
%i[baseline_sha candidate_sha profile].each { |key| report[key] = @options[key] if @options.has_key?(key) }
|
|
473
|
-
|
|
498
|
+
if samples.is_a?(Hash)
|
|
499
|
+
report.merge!(samples.slice('baseline_sha', 'candidate_sha', 'profile', 'harness_sha256', 'budget_sha256').transform_keys(&:to_sym))
|
|
500
|
+
end
|
|
501
|
+
report[:comparison] = comparison if comparison
|
|
474
502
|
File.write(File.join(@output, 'report.json'), JSON.pretty_generate(report)) if @output && File.directory?(@output)
|
|
475
503
|
warn JSON.generate(report)
|
|
476
504
|
3
|
|
@@ -482,7 +510,7 @@ module HaveAPI
|
|
|
482
510
|
raise ContractError, 'Expected run or compare' unless %w[run compare].include?(@mode)
|
|
483
511
|
|
|
484
512
|
OptionParser.new do |parser|
|
|
485
|
-
%w[baseline-root baseline-sha candidate-root candidate-sha profile budgets output input].each do |name|
|
|
513
|
+
%w[baseline-root baseline-sha candidate-root candidate-sha profile budgets output input push-event].each do |name|
|
|
486
514
|
parser.on("--#{name} VALUE") { |value| @options[name.tr('-', '_').to_sym] = value }
|
|
487
515
|
end
|
|
488
516
|
end.parse!(@argv)
|
|
@@ -543,19 +571,44 @@ module HaveAPI
|
|
|
543
571
|
{ root:, sha:, tracked_files: files.length, files_sha256: graph, tree: git('rev-parse', "#{sha}^{tree}").strip }
|
|
544
572
|
end
|
|
545
573
|
|
|
574
|
+
def verify_runtime
|
|
575
|
+
expected = Identity.parse(File.read(@options.fetch(:budgets))).fetch('environment').fetch('weekly')
|
|
576
|
+
ruby = JSON.parse(JSON.generate(Worker.new({}).environment.fetch(:ruby)))
|
|
577
|
+
raise ContractError, 'Calibration Ruby mismatch' unless ruby == expected.fetch('ruby')
|
|
578
|
+
|
|
579
|
+
expected.fetch('gems').each do |name, identity|
|
|
580
|
+
unless Gem::Specification.find_all_by_name(name, identity.fetch('version')).any? { |spec| spec.platform.to_s == identity.fetch('platform') }
|
|
581
|
+
raise ContractError, "Missing calibrated dependency #{name}"
|
|
582
|
+
end
|
|
583
|
+
end
|
|
584
|
+
end
|
|
585
|
+
|
|
546
586
|
def run_samples(digest)
|
|
547
587
|
policy = PROFILES.fetch(@options.fetch(:profile))
|
|
588
|
+
verify_runtime
|
|
548
589
|
Performance.validate_source_pair(profile: @options[:profile], baseline_sha: @options[:baseline_sha],
|
|
549
590
|
candidate_sha: @options[:candidate_sha])
|
|
550
591
|
|
|
551
592
|
sources = %w[baseline candidate].to_h { |role| [role, verify_source(role)] }
|
|
552
593
|
@sources = JSON.parse(JSON.generate(sources))
|
|
553
594
|
@release_lineage = Release.lineage(git: method(:git), ancestor: method(:ancestor?), candidate: @options[:candidate_sha])
|
|
554
|
-
|
|
595
|
+
if @options[:push_event]
|
|
596
|
+
raise ContractError, 'Push event exception requires quick profile' unless @options[:profile] == 'quick'
|
|
597
|
+
|
|
598
|
+
push = Performance.push_pair!(Identity.parse(File.read(@options[:push_event])), baseline: @options[:baseline_sha], candidate: @options[:candidate_sha])
|
|
599
|
+
raise ContractError, 'Missing exact push pair' unless push
|
|
600
|
+
end
|
|
601
|
+
unless push || ancestor?(@options[:baseline_sha], @options[:candidate_sha]) ||
|
|
555
602
|
(@options[:profile] == 'weekly' && @options[:baseline_sha] == REFERENCE && @release_lineage)
|
|
556
603
|
raise ContractError, 'Baseline must be an ancestor of candidate'
|
|
557
604
|
end
|
|
558
605
|
|
|
606
|
+
@sources.each_value do |source|
|
|
607
|
+
Release::VERSIONS.each do |path, name|
|
|
608
|
+
Performance.gemspec(source.fetch('root'), "#{path.split('/lib/').first}/#{name}.gemspec")
|
|
609
|
+
end
|
|
610
|
+
end
|
|
611
|
+
|
|
559
612
|
pilot = child('baseline', {}, 'pilot')
|
|
560
613
|
inventory = pilot.fetch('inventory')
|
|
561
614
|
counts = pilot.fetch('cases').to_h do |item|
|
|
@@ -622,8 +675,8 @@ module HaveAPI
|
|
|
622
675
|
|
|
623
676
|
def child(role, counts, label, workload_order = 'forward')
|
|
624
677
|
request = { source_root: File.realpath(@options.fetch(:"#{role}_root")), source_sha: @options.fetch(:"#{role}_sha"),
|
|
625
|
-
profile: @options[:profile], workload_order:, counts:, warmup_counts: @warmup_counts || {}, release_versions: !@release_lineage.nil
|
|
626
|
-
env = ENV.keys.grep(/\ABUNDLE|\ABUNDLER|\ARUBY(?:OPT|LIB)\z/).to_h { |key| [key, nil] }
|
|
678
|
+
profile: @options[:profile], workload_order:, counts:, warmup_counts: @warmup_counts || {}, release_versions: !@release_lineage.nil?, benchmark: true }
|
|
679
|
+
env = ENV.keys.grep(/\ABUNDLE|\ABUNDLER|\ARUBY(?:OPT|LIB|GEMS_GEMDEPS)\z/).to_h { |key| [key, nil] }
|
|
627
680
|
env.merge!('LC_ALL' => 'C.UTF-8', 'LANG' => 'C.UTF-8', 'TZ' => 'UTC', 'RUBY_YJIT_ENABLE' => '0', 'RACK_ENV' => 'test')
|
|
628
681
|
process_started = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
629
682
|
output, errors, status = capture_worker(env, request, label)
|
|
@@ -651,6 +704,9 @@ module HaveAPI
|
|
|
651
704
|
else
|
|
652
705
|
Release.validate_json_preparation(inputs, @sources.fetch(role))
|
|
653
706
|
end
|
|
707
|
+
expected = Identity.parse(File.read(@options.fetch(:budgets))).fetch('environment').fetch('weekly')
|
|
708
|
+
raise ContractError, 'Calibration environment mismatch' unless result.fetch('environment') == expected
|
|
709
|
+
|
|
654
710
|
common = result.slice('environment', 'inventory', 'fixture_sha256').merge('inputs' => Release.graph(inputs))
|
|
655
711
|
@common ||= common
|
|
656
712
|
raise ContractError, 'Incompatible dependency/runtime/input/workload graph' unless common == @common
|