-
Notifications
You must be signed in to change notification settings - Fork 127
Add benchmarks to pipeline tests #958
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
Conversation
xUnit format doesn't allow multiple results in a single file.
|
|
|
@Mergifyio refresh |
✅ Pull request refreshed |
🌐 Coverage report
|
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.
Thanks Marc for continuing with this! I have added some comments, but mostly questions and nitpicking.
I think that this is mostly fine, maybe we can merge it and continue with follow ups. It looks quite useful already as is.
| }, | ||
| { | ||
| "@timestamp": "2016-10-25T12:49:34.000Z", | ||
| "message": "127.0.0.1 - - [07/Dec/2016:11:05:07 +0100] \"GET /taga HTTP/1.1\" 404 169 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:49.0) Gecko/20100101 Firefox/49.0\"\n" |
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.
As we are going to repeat documents to reach num_docs, we may want to add some templatization here, for example to generate dates. In case ES has some kind of cache when parsing certain things.
But to be done as a follow up if needed/wanted.
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.
Yes I was thinking about this, maybe even some sort of fuzzing or property based document generation at some point.
| // does not default to unmarshaling numeric values to float64 in order to | ||
| // prevent low bit truncation of values greater than 1<<53. | ||
| // See https://golang.org/cl/6202068 for details. | ||
| func jsonUnmarshalUsingNumber(data []byte, v interface{}) error { |
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.
Maybe we should move this to some common place, as is used also in test runner. But it is fine here by now.
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.
Mostly minor things.
Left a comment about the similarity with the test runner to verify if we should do something about this.
| } | ||
|
|
||
| // FindBenchmarkFolders finds benchmark folders for the given package and, optionally, benchmark type and data streams | ||
| func FindBenchmarkFolders(packageRootPath string, dataStreams []string, benchType BenchType) ([]testrunner.TestFolder, error) { |
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 see that a lot of the benchrunner logic is similar to the testrunner. Frankly speaking, we consider that part of elastic-package as a candidate to be refactored :) I'm wondering if you can extract some common elements of both runners.
If it's a stupid idea, feel free to decline. I know that the logic is tangled 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.
The reason I preferred to duplicate it in this case is because I am not sure of how this feature might evolve in the near future, so is possible that the logic starts diverging more as time goes by. I am happy to do that if you prefer so now, but given the logic is quite coupled I think it was safer to just assume some level of duplication given both features are isolated and are not intended to evolve together at this point.
- Rename benchrunner.go -> benchmark.go - Add data-streams as a persistent flag - Add num-top-procs flag - Implement Stringer for BenchmarkValue - Rename benchFmtd -> benchFormatted - Make constants global
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.
Thanks!
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.
|
@dependabot merge upstream |
Recreated from #906