-
Notifications
You must be signed in to change notification settings - Fork 17
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
DEV-6326 Allow custom functions to be benchmarked #239
Conversation
Pull Request Test Coverage Report for Build 2197
💛 - Coveralls |
} | ||
}) | ||
.resume(); | ||
}).listen(8080); |
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.
it would be useful to assign the port number manually: npm run performance-server --port 8181
. But I think we can do this together with https://github.com/FontoXML/fontoxpath/blob/master/demo/server.ts#L35
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.
What do you mean to do it together with the other one? Is there a story or an issue to make that one configurable?
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.
Turns out this is not easily doable. https://github.com/kimmobrunfeldt/concurrently/issues/33
I'd prefer to just keep 8080 as static port number for now as is also done in the demo/server.ts you linked.
If you want to have support for this than I suggest that we create a separate issue for this, if you do so please also include the github issue I referenced as the library "concurrently" which we are using now creates the problem.
performance/BenchmarkRunner.ts
Outdated
): void { | ||
this._benchmarks.push({ | ||
benchmark: new Benchmark(name, test), | ||
// We do not use the setup and teardown which is offered withing the API of benchmarkjs |
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.
within*
when I run npm run performance, it will run all performance tests, right? Is it too hard to add something like this: |
API has the same format as we're used from unit tests
@mehmetscoskun I've added the API to run only 1 performance benchmark. This is the |
@@ -1,5 +1,6 @@ | |||
/coverage | |||
/node_modules | |||
/performance/lib |
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.
please verify whether this folder will not be included in a publish
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.
Check it with an npm build
and npm pack
could not see signs of the benchmark tooling in either.
"extends": ["../tslint.json"], | ||
"rules": { | ||
"no-console": false, | ||
"no-implicit-dependencies": false |
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.
why only here?
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.
Same as in the tests. It's needed to import benchmark. Seems to not like using dev-dependencies.
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 have left some small pieces of feedback. LGTM!
Please make sure to review the compare.benchmark.ts carefully. It's important that the "manual" code does the same as the "xpath" version. I've already confirmed that the end result of both are equal.