-
Notifications
You must be signed in to change notification settings - Fork 5
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
Race condition causes periodic failure to generate html report #3
Comments
Good spot, thanks! Can you include here, just for reference, node version you are using, OS and module version (is it the latest one?) I'll try to have a look later today. Thanks |
Just published v0.1.1 - Can you try to upgrade an see if it is fixed? 👍 |
Node v0.10.35 I updated to grunt-api-benchmark@0.1.1, but my task still intermittently fails to generate the html file. This is what I get...
|
Lol, my fault! Can you retry with 0.1.2? 👍 |
Both reports are being generated regularly. Seems to be working as expected now. Thanks! |
yay :) closing this. Thanks for your help 👍 |
I've setup grunt-api-benchmark to generate both the html and json versions of the benchmark results from the same config file.
The task always creates the api-benchmark.json file, but sporadicly creates the api-benchmark.html file. When I say "sporadicly", I mean that I can run the task 5 times without changing anything, and a few of the times it will create the html file successfully, and a few times it won't.
I traced the issue to a fs.readFile call in api-benchmark. That call is asynchronous, and it seems to be creating a race condition with the grunt task's code.
When I change that line to...
...the html version of the file gets created every single time without fail.
The text was updated successfully, but these errors were encountered: