Comments (2)
Thank you for writing this down. I like the idea!
How would we export to multiple formats? I sometimes export to markdown and json at the same time, for example.
from hyperfine.
Thanks for the feedback! You've raised an excellent point.
Let's say we're targeting all export formats. Currently, we do that with:
hyperfine \
--export-asciidoc FILE.asciidoc \
--export-csv FILE.csv \
--export-json FILE.json \
--export-markdown FILE.md \
--export-markdown FILE.org
With an auto-detection feature in place, we could rely on default file extensions and implicit file format inference:
hyperfine -f FILE.asciidoc -f FILE.csv -f FILE.json -f FILE.md -f FILE.org
We can also reduce verbosity by adding the ability to group formats:
hyperfine -f FILE.asciidoc,FILE.csv,FILE.json,FILE.md,FILE.org
Another option is to reuse the existing idea of the parameter list -L
, and introduce an -E
flag for exporting formats. For example:
hyperfine -E asciidoc,csv,json,md,org '-f FILE.{ext}'
Consider a different scenario, where we want to export all formats file extensions arbitrarily. Right now:
hyperfine \
--export-asciidoc result.org \
--export-csv result.asciidoc \
--export-json result.csv \
--export-markdown result.json \
--export-orgmode result.md
With a -E
flag we have the option to combine with an hypothetical -F
:
hyperfine \
-F fmt asciidoc,csv,json,markdown,orgmode \
-E ext org,asciidoc,csv,json,md \
'-f {fmt} result.{ext}'
Note that in flags -E
and -F
, quoted blocks will be interpreted exclusively for exporting, not adding extra commands to be benchmarked.
In the long run, this level of parametrization may not be high priority, as it appears to cater more to rare use cases.
from hyperfine.
Related Issues (20)
- Trouble with syntax and ripgrep (in fish shell) HOT 2
- Feature request: save data directories for each run (run index as format specifier in the command) HOT 1
- Support --time-unit microsecond HOT 3
- Add quieter markdown `stdout` export HOT 2
- Add short flag counterparts
- hyperfine 1.18.0 not published at crates.io HOT 1
- Usage of `hyperfine` to benchmark code HOT 1
- ETA not clearly visible on terminals with a block cursor HOT 1
- run commands only once per set of parameters they use
- Always in this "Initial time measurement" state HOT 6
- Include parameters in output HOT 2
- T
- `-N` makes me can't pass options for command which'll be benchmarked. HOT 1
- Output cpu, disc and memory information HOT 3
- hypperfine without --show-output hard to read on windows7 cmd console HOT 1
- Using --prepare increases benchmark results HOT 2
- Allow custom time measurements HOT 1
- Feature request: Remote commands HOT 1
- Provide Statically Compiled Binaries for (aarch64|arm64) Linux
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hyperfine.