-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Triggering failed benchmarks #9
Comments
Thanks @mitermayer. It's been a long while since I've worked on karma-benchmark, but once I've finished what I'm doing on shrinkpack and ImageOptim-CLI I plan to pick this back up again in a couple of months. |
Should be able to pick this up in the next couple of weeks @mitermayer and have a couple of questions.
Could you add some more detail on what this might look like? eg. what karma.conf.js and/or your benchmarks might look like to use. In this example: suite('Array iteration', function() {
benchmark('_.each', function() {
_.each([1, 2, 3], function(el) {
return el;
});
});
benchmark('native forEach', function() {
[1, 2, 3].forEach(function(el) {
return el;
});
});
}); Are you suggesting that if eg native forEach is 10% slower than _.each it should fail? Could you give me some examples of what kinds of things you'd be working on when doing this? I'm a bit stuck on this one.
Are you thinking here of an option in karma.conf.js which applies to all benchmarks, if any single benchmark doesn't pass that value, mark it as a failed test? Thanks. |
Thinking about it some more (and correct me if I'm wrong, but) I think triggering failures is normally handled by reporters – @rawrmonstar is this something you might consider adding as an option to FormidableLabs/karma-benchmarkjs-reporter? Thanks all. |
@JamieMason I'll add an issue, but I'm not sure when I can get around to it. |
I was wondering if there would be a way to use this in the form of
anothe useful way would be to fail a suite if performed less then x operations per second.
The text was updated successfully, but these errors were encountered: