Coder Social home page Coder Social logo

Export to Markdown about hyperfine HOT 6 CLOSED

sharkdp avatar sharkdp commented on May 17, 2024
Export to Markdown

from hyperfine.

Comments (6)

stevepentland avatar stevepentland commented on May 17, 2024

I've started looking at this and it seems like we're going to implement this one by hand. There's been nothing I've seen that will do this form of serialization by default, and nothing in particular that will integrate with serde.

from hyperfine.

sharkdp avatar sharkdp commented on May 17, 2024

Using something like https://docs.rs/comrak/0.2.8/comrak/ could work (create an AST that represents the table and pretty-print it via format_commonmark).

On the other hand, maybe the easiest option for now would be to simply write! the markdown table by hand. It doesn't necessarily have to look pretty in the source file.

from hyperfine.

stevepentland avatar stevepentland commented on May 17, 2024

True, in our case simply creating the encoded values ourselves will probably be best as it is rather simple. I'll move into that next since #45 is now ready

from hyperfine.

stevepentland avatar stevepentland commented on May 17, 2024

@sharkdp I've completed this in my export-markdown branch. I'll make a PR once #45 has been merged.

Export result:

Benchmark Mean [ms] Min. [ms] Max. [ms]
ls -R ~ | echo "test" 4.1 ± 0.7 1.2 6.5
ls -alR | echo "TEST" 5.1 ± 0.9 3.2 11.2

from hyperfine.

sharkdp avatar sharkdp commented on May 17, 2024

Looks great! Maybe we could add backticks ("`") around the command such that it would render as code?

from hyperfine.

stevepentland avatar stevepentland commented on May 17, 2024

Missed your comment, adding it now

from hyperfine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.