astral-dev-toolchain-hyperfine 1.20.0__py3-none-win_amd64.whl

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.
@@ -0,0 +1,387 @@
1
+ Metadata-Version: 2.4
2
+ Name: astral-dev-toolchain-hyperfine
3
+ Version: 1.20.0
4
+ Summary: A command-line benchmarking tool
5
+ Home-Page: https://github.com/sharkdp/hyperfine
6
+ Maintainer-email: Astral <hey@astral.sh>
7
+ License: MIT OR Apache-2.0
8
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
9
+ Project-URL: Homepage, https://github.com/sharkdp/hyperfine
10
+ Project-URL: Source Code, https://github.com/sharkdp/hyperfine
11
+
12
+ > **Build provenance:** This package is built and distributed by [Astral](https://astral.sh) as part of [`astral-dev-toolchain`](https://github.com/astral-sh/astral-dev-toolchain).
13
+ > It packages [`hyperfine`](https://github.com/sharkdp/hyperfine) from tag `v1.20.0` at commit `975fe108c4ee7bd2600d10758207b44ca3dae738`.
14
+
15
+ ---
16
+
17
+ # hyperfine
18
+ [![CICD](https://github.com/sharkdp/hyperfine/actions/workflows/CICD.yml/badge.svg)](https://github.com/sharkdp/hyperfine/actions/workflows/CICD.yml)
19
+ [![Version info](https://img.shields.io/crates/v/hyperfine.svg)](https://crates.io/crates/hyperfine)
20
+ [中文](https://github.com/chinanf-boy/hyperfine-zh)
21
+
22
+ A command-line benchmarking tool.
23
+
24
+ **Demo**: Benchmarking [`fd`](https://github.com/sharkdp/fd) and
25
+ [`find`](https://www.gnu.org/software/findutils/):
26
+
27
+ ![hyperfine](https://i.imgur.com/z19OYxE.gif)
28
+
29
+ ### Sponsors
30
+
31
+ A special *thank you* goes to our biggest <a href="doc/sponsors.md">sponsors</a>:<br>
32
+
33
+ <a href="https://www.warp.dev/hyperfine">
34
+ <img src="doc/sponsors/warp-logo.png" width="200" alt="Warp">
35
+ <br>
36
+ <strong>Warp, the intelligent terminal</strong>
37
+ <br>
38
+ <sub>Available on MacOS, Linux, Windows</sub>
39
+ </a>
40
+
41
+ <br>
42
+ <br>
43
+
44
+ <a href="https://tuple.app/hyperfine">
45
+ <img src="doc/sponsors/tuple-logo.png" width="200" alt="Tuple">
46
+ <br>
47
+ <strong>Tuple, the premier screen sharing app for developers</strong>
48
+ <br>
49
+ <sub>Available for MacOS &amp; Windows</sub>
50
+ </a>
51
+
52
+ ## Features
53
+
54
+ * Statistical analysis across multiple runs.
55
+ * Support for arbitrary shell commands.
56
+ * Constant feedback about the benchmark progress and current estimates.
57
+ * Warmup runs can be executed before the actual benchmark.
58
+ * Cache-clearing commands can be set up before each timing run.
59
+ * Statistical outlier detection to detect interference from other programs and caching effects.
60
+ * Export results to various formats: CSV, JSON, Markdown, AsciiDoc.
61
+ * Parameterized benchmarks (e.g. vary the number of threads).
62
+ * Cross-platform
63
+
64
+ ## Usage
65
+
66
+ ### Basic benchmarks
67
+
68
+ To run a benchmark, you can simply call `hyperfine <command>...`. The argument(s) can be any
69
+ shell command. For example:
70
+ ```sh
71
+ hyperfine 'sleep 0.3'
72
+ ```
73
+
74
+ Hyperfine will automatically determine the number of runs to perform for each command. By default,
75
+ it will perform *at least* 10 benchmarking runs and measure for at least 3 seconds. To change this,
76
+ you can use the `-r`/`--runs` option:
77
+ ```sh
78
+ hyperfine --runs 5 'sleep 0.3'
79
+ ```
80
+
81
+ If you want to compare the runtimes of different programs, you can pass multiple commands:
82
+ ```sh
83
+ hyperfine 'hexdump file' 'xxd file'
84
+ ```
85
+
86
+ ### Warmup runs and preparation commands
87
+
88
+ For programs that perform a lot of disk I/O, the benchmarking results can be heavily influenced
89
+ by disk caches and whether they are cold or warm.
90
+
91
+ If you want to run the benchmark on a warm cache, you can use the `-w`/`--warmup` option to
92
+ perform a certain number of program executions before the actual benchmark:
93
+ ```sh
94
+ hyperfine --warmup 3 'grep -R TODO *'
95
+ ```
96
+
97
+ Conversely, if you want to run the benchmark for a cold cache, you can use the `-p`/`--prepare`
98
+ option to run a special command before *each* timing run. For example, to clear harddisk caches
99
+ on Linux, you can run
100
+ ```sh
101
+ sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
102
+ ```
103
+ To use this specific command with hyperfine, call `sudo -v` to temporarily gain sudo permissions
104
+ and then call:
105
+ ```sh
106
+ hyperfine --prepare 'sync; echo 3 | sudo tee /proc/sys/vm/drop_caches' 'grep -R TODO *'
107
+ ```
108
+
109
+ ### Parameterized benchmarks
110
+
111
+ If you want to run a series of benchmarks where a single parameter is varied (say, the number of
112
+ threads), you can use the `-P`/`--parameter-scan` option and call:
113
+ ```sh
114
+ hyperfine --prepare 'make clean' --parameter-scan num_threads 1 12 'make -j {num_threads}'
115
+ ```
116
+ This also works with decimal numbers. The `-D`/`--parameter-step-size` option can be used
117
+ to control the step size:
118
+ ```sh
119
+ hyperfine --parameter-scan delay 0.3 0.7 -D 0.2 'sleep {delay}'
120
+ ```
121
+ This runs `sleep 0.3`, `sleep 0.5` and `sleep 0.7`.
122
+
123
+ For non-numeric parameters, you can also supply a list of values with the `-L`/`--parameter-list`
124
+ option:
125
+ ```
126
+ hyperfine -L compiler gcc,clang '{compiler} -O2 main.cpp'
127
+ ```
128
+
129
+ ### Intermediate shell
130
+
131
+ By default, commands are executed using a predefined shell (`/bin/sh` on Unix, `cmd.exe` on Windows).
132
+ If you want to use a different shell, you can use the `-S, --shell <SHELL>` option:
133
+ ```sh
134
+ hyperfine --shell zsh 'for i in {1..10000}; do echo test; done'
135
+ ```
136
+
137
+ Note that hyperfine always *corrects for the shell spawning time*. To do this, it performs a calibration
138
+ procedure where it runs the shell with an empty command (multiple times), to measure the startup time
139
+ of the shell. It will then subtract this time from the total to show the actual time used by the command
140
+ in question.
141
+
142
+ If you want to run a benchmark *without an intermediate shell*, you can use the `-N` or `--shell=none`
143
+ option. This is helpful for very fast commands (< 5 ms) where the shell startup overhead correction would
144
+ produce a significant amount of noise. Note that you cannot use shell syntax like `*` or `~` in this case.
145
+ ```
146
+ hyperfine -N 'grep TODO /home/user'
147
+ ```
148
+
149
+
150
+ ### Shell functions and aliases
151
+
152
+ If you are using bash, you can export shell functions to directly benchmark them with hyperfine:
153
+
154
+ ```bash
155
+ my_function() { sleep 1; }
156
+ export -f my_function
157
+ hyperfine --shell=bash my_function
158
+ ```
159
+
160
+ Otherwise, inline them into or source them from the benchmarked program:
161
+
162
+ ```sh
163
+ hyperfine 'my_function() { sleep 1; }; my_function'
164
+
165
+ echo 'alias my_alias="sleep 1"' > /tmp/my_alias.sh
166
+ hyperfine '. /tmp/my_alias.sh; my_alias'
167
+ ```
168
+
169
+ ### Exporting results
170
+
171
+ Hyperfine has multiple options for exporting benchmark results to CSV, JSON, Markdown and other
172
+ formats (see `--help` text for details).
173
+
174
+ #### Markdown
175
+
176
+ You can use the `--export-markdown <file>` option to create tables like the following:
177
+
178
+ | Command | Mean [s] | Min [s] | Max [s] | Relative |
179
+ |:---|---:|---:|---:|---:|
180
+ | `find . -iregex '.*[0-9]\.jpg$'` | 2.275 ± 0.046 | 2.243 | 2.397 | 9.79 ± 0.22 |
181
+ | `find . -iname '*[0-9].jpg'` | 1.427 ± 0.026 | 1.405 | 1.468 | 6.14 ± 0.13 |
182
+ | `fd -HI '.*[0-9]\.jpg$'` | 0.232 ± 0.002 | 0.230 | 0.236 | 1.00 |
183
+
184
+ #### JSON
185
+
186
+ The JSON output is useful if you want to analyze the benchmark results in more detail. The
187
+ [`scripts/`](https://github.com/sharkdp/hyperfine/tree/master/scripts) folder includes a lot
188
+ of helpful Python programs to further analyze benchmark results and create helpful
189
+ visualizations, like a histogram of runtimes or a whisker plot to compare
190
+ multiple benchmarks:
191
+
192
+ | ![](doc/histogram.png) | ![](doc/whisker.png) |
193
+ |---:|---:|
194
+
195
+
196
+ ### Detailed benchmark flowchart
197
+
198
+ The following chart explains the execution order of various timing runs when using options
199
+ like `--warmup`, `--prepare <cmd>`, `--setup <cmd>` or `--cleanup <cmd>`:
200
+
201
+ ![](doc/execution-order.png)
202
+
203
+ ## Installation
204
+
205
+ [![Packaging status](https://repology.org/badge/vertical-allrepos/hyperfine.svg?columns=3&exclude_unsupported=1)](https://repology.org/project/hyperfine/versions)
206
+
207
+ ### On Ubuntu
208
+
209
+ On Ubuntu, hyperfine can be installed [from the official repositories](https://launchpad.net/ubuntu/+source/rust-hyperfine):
210
+ ```
211
+ apt install hyperfine
212
+ ```
213
+
214
+ Alternatively, for the latest version, you can download the appropriate `.deb` package from the [Release page](https://github.com/sharkdp/hyperfine/releases) and install it via `dpkg`:
215
+ ```
216
+ wget https://github.com/sharkdp/hyperfine/releases/download/v1.20.0/hyperfine_1.20.0_amd64.deb
217
+ sudo dpkg -i hyperfine_1.20.0_amd64.deb
218
+ ```
219
+
220
+ ### On Fedora
221
+
222
+ On Fedora, hyperfine can be installed from the official repositories:
223
+
224
+ ```sh
225
+ dnf install hyperfine
226
+ ```
227
+
228
+ ### On Alpine Linux
229
+
230
+ On Alpine Linux, hyperfine can be installed [from the official repositories](https://pkgs.alpinelinux.org/packages?name=hyperfine):
231
+ ```
232
+ apk add hyperfine
233
+ ```
234
+
235
+ ### On Arch Linux
236
+
237
+ On Arch Linux, hyperfine can be installed [from the official repositories](https://archlinux.org/packages/extra/x86_64/hyperfine/):
238
+ ```
239
+ pacman -S hyperfine
240
+ ```
241
+
242
+ ### On Debian Linux
243
+
244
+ On Debian Linux, hyperfine can be installed [from the official repositories](https://packages.debian.org/hyperfine):
245
+ ```
246
+ apt install hyperfine
247
+ ```
248
+
249
+ ### On Exherbo Linux
250
+
251
+ On Exherbo Linux, hyperfine can be installed [from the rust repositories](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/sys-apps/hyperfine):
252
+ ```
253
+ cave resolve -x repository/rust
254
+ cave resolve -x hyperfine
255
+ ```
256
+
257
+ ### On Funtoo Linux
258
+
259
+ On Funtoo Linux, hyperfine can be installed [from core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-benchmarks/hyperfine):
260
+ ```
261
+ emerge app-benchmarks/hyperfine
262
+ ```
263
+
264
+ ### On NixOS
265
+
266
+ On NixOS, hyperfine can be installed [from the official repositories](https://nixos.org/nixos/packages.html?query=hyperfine):
267
+ ```
268
+ nix-env -i hyperfine
269
+ ```
270
+
271
+ ### On Flox
272
+
273
+ On Flox, hyperfine can be installed as follows.
274
+ ```
275
+ flox install hyperfine
276
+ ```
277
+ Hyperfine's version in Flox follows that of Nix.
278
+
279
+ ### On openSUSE
280
+
281
+ On openSUSE, hyperfine can be installed [from the official repositories](https://software.opensuse.org/package/hyperfine):
282
+ ```
283
+ zypper install hyperfine
284
+ ```
285
+
286
+ ### On Void Linux
287
+
288
+ Hyperfine can be installed via xbps
289
+
290
+ ```
291
+ xbps-install -S hyperfine
292
+ ```
293
+
294
+ ### On macOS
295
+
296
+ Hyperfine can be installed via [Homebrew](https://brew.sh):
297
+ ```
298
+ brew install hyperfine
299
+ ```
300
+
301
+ Or you can install using [MacPorts](https://www.macports.org):
302
+ ```
303
+ sudo port selfupdate
304
+ sudo port install hyperfine
305
+ ```
306
+
307
+ ### On FreeBSD
308
+
309
+ Hyperfine can be installed via pkg:
310
+ ```
311
+ pkg install hyperfine
312
+ ```
313
+
314
+ ### On OpenBSD
315
+
316
+ ```
317
+ doas pkg_add hyperfine
318
+ ```
319
+
320
+ ### On Windows
321
+
322
+ Hyperfine can be installed via [Chocolatey](https://community.chocolatey.org/packages/hyperfine), [Scoop](https://scoop.sh/#/apps?q=hyperfine&s=0&d=1&o=true&id=8f7c10f75ecf5f9e42a862c615257328e2f70f61), or [Winget](https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/sharkdp/hyperfine):
323
+ ```
324
+ choco install hyperfine
325
+ ```
326
+ ```
327
+ scoop install hyperfine
328
+ ```
329
+ ```
330
+ winget install hyperfine
331
+ ```
332
+
333
+ ### With conda
334
+
335
+ Hyperfine can be installed via [`conda`](https://conda.io/en/latest/) from the [`conda-forge`](https://anaconda.org/conda-forge/hyperfine) channel:
336
+ ```
337
+ conda install -c conda-forge hyperfine
338
+ ```
339
+
340
+ ### With cargo (Linux, macOS, Windows)
341
+
342
+ Hyperfine can be installed from source via [cargo](https://doc.rust-lang.org/cargo/):
343
+ ```
344
+ cargo install --locked hyperfine
345
+ ```
346
+
347
+ Make sure that you use Rust 1.76 or newer.
348
+
349
+ ### From binaries (Linux, macOS, Windows)
350
+
351
+ Download the corresponding archive from the [Release page](https://github.com/sharkdp/hyperfine/releases).
352
+
353
+ ## Alternative tools
354
+
355
+ Hyperfine is inspired by [bench](https://github.com/Gabriella439/bench).
356
+
357
+ ## Integration with other tools
358
+
359
+ [Chronologer](https://github.com/dandavison/chronologer) is a tool that uses `hyperfine` to
360
+ visualize changes in benchmark timings across your Git history.
361
+
362
+ [Bencher](https://github.com/bencherdev/bencher) is a continuous benchmarking tool that supports `hyperfine` to
363
+ track benchmarks and catch performance regressions in CI.
364
+
365
+ Drop hyperfine JSON outputs onto the [Venz](https://try.venz.dev) chart to visualize the results,
366
+ and manage hyperfine configurations.
367
+
368
+ Make sure to check out the [`scripts` folder](https://github.com/sharkdp/hyperfine/tree/master/scripts)
369
+ in this repository for a set of tools to work with `hyperfine` benchmark results.
370
+
371
+ ## Origin of the name
372
+
373
+ The name *hyperfine* was chosen in reference to the hyperfine levels of caesium 133 which play a crucial role in the
374
+ [definition of our base unit of time](https://en.wikipedia.org/wiki/Second#History_of_definition)
375
+ — the second.
376
+
377
+ ## Citing hyperfine
378
+
379
+ Thank you for considering to cite hyperfine in your research work. Please see the information
380
+ in the sidebar on how to properly cite hyperfine.
381
+
382
+ ## License
383
+
384
+ `hyperfine` is dual-licensed under the terms of the MIT License and the Apache License 2.0.
385
+
386
+ See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for details.
387
+
@@ -0,0 +1,5 @@
1
+ astral_dev_toolchain_hyperfine-1.20.0.data/scripts/hyperfine.exe,sha256=yUmTCOOfJErLUQBXl1oKfN6BM5CTs_rwxwT6AEH6pQw,1278464
2
+ astral_dev_toolchain_hyperfine-1.20.0.dist-info/METADATA,sha256=C1TVga4TztcULFRj8t6PEpqhCcqw4vncNoQ-uz6fWbY,12368
3
+ astral_dev_toolchain_hyperfine-1.20.0.dist-info/WHEEL,sha256=2zDlIYIdD4m4N3p5DVEG3iJhGLdhsBQgdH-FqVkAur8,94
4
+ astral_dev_toolchain_hyperfine-1.20.0.dist-info/sboms/hyperfine.cyclonedx.json,sha256=lFnm2Kikm2X4SEuXK47G4HKq3EpgrpgVK7s9doiGTrs,129569
5
+ astral_dev_toolchain_hyperfine-1.20.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.14.1)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64