mcollina / autocannon

fast HTTP/1.1 benchmarking tool written in Node.js
MIT License
7.89k stars 329 forks source link

provide html generator #32

Open mcollina opened 8 years ago

mcollina commented 8 years ago

I think we can build another tool that takes autocannon json and produces an html page, possibly with comparisons with a previous run. We may want to add some metadata to the CLI to add a name to the given bench.

Also, we can print the latency using a histogram and so on.. :D.

GlenTiki commented 8 years ago

I've been thinking about this, it could be achieved nicely using template strings, and we could embed some third part libraries into the html by downloading minified versions of them and reading them into buffers on creation of the html, and stringifying them. It would enable everything to be viewed offline, and we could look at adding graphs, etc, for the histogram data :D thoughts?

mcollina commented 8 years ago

@thekemkid yes! I think we should embed everything in the same HTML thing, if possible. Ideally the HTML should be self-consumable, with no external dependency. @davidmarkclements did some similar work on this stuff for 0x. @mcdonnelldean did some research on graphs, and I think he found https://gionkunz.github.io/chartist-js/ very useful.

mcollina commented 8 years ago

You might want to have a look at https://www.npmjs.com/package/hyperx (it's the basis of yo-yo).

03k64 commented 7 years ago

I've been working on Winchester recently, which allows AutoCannon to be configured for automation purposes (we aim to use it for nightly soak testing at work). It produces output in the form of HTML pages using Pug & Chartist for local consumption as well as having an option to log data to a StatsD server.

I don't know whether it fits the need described in this issue, but I'd love to get your thoughts on it.

mcollina commented 7 years ago

@darArch cool! Would you like to extract the HTML generator into its own tool? That would make it more composable than a full runner.

Also, it should run on Node v4+.

Do you have a published example of the html?

03k64 commented 7 years ago

Cool, there is example output in the example folder, if you clone the repo you should be able to just open the files in your browser. I'll probably add some screenshots to the README too. It's pretty basic but you get the overall idea of what it looks like and it should be pretty easy to expand upon.

I'll start looking into Node v4+ compatibility first, then extract the generator afterwards.