-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #10: Render progress bar programmatically. #13
Conversation
Users can pass `renderProgressBar: true` to render the progress bar from an external tool. Additionally, they can provide `progressBarString: SOME_STRING` to modify the output format of the progress bar. This string must meet the format specified in http://npm.im/progress
Thinking twice about this, I think we should just move all the output logic from the main Something like: const autocannon = require('autocannon')
const instance = autocannon({ url: 'http://localhost:3000' }, done)
// customize your autocannon instance here
autocannon.track(instance, process.stdout) Does it make sense? That do you think? |
That sounds okay, I will update my PR to reflect this :) |
* `progressBarString`: A `string` defining the format of the progress display output. Must be valid input for the [progress bar module](http://npm.im/progress). | ||
|
||
**Returns** an instance/event emitter for tracking progress, etc. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably list the events of this instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to merge both of my open PR's and then do docs on the events emitted by the instance, as the 'response' event needs to be explained, and the client object which it passes to the cb: https://github.com/mcollina/autocannon/pull/14/files#diff-de78b50723ff596d7bd35665f36a6cbfR60
This one is good to go then :). |
Users can pass
renderProgressBar: true
to render theprogress bar from an external tool. Additionally, they
can provide
progressBarString: SOME_STRING
to modifythe output format of the progress bar. This string must
meet the format specified in npm.im/progress
This will require a review.
Additionally... how should I test this?