-
Notifications
You must be signed in to change notification settings - Fork 681
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
Add a benchmark which uses Google benchmark library #1392
Conversation
@@ -1,4 +1,4 @@ | |||
cmake_minimum_required(VERSION 3.12) | |||
cmake_minimum_required(VERSION 3.14) |
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.
fetchcontent_makeavailable
added in 3.14
@seladb It is ready to review if you have time |
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 one comment, otherwise LGTM
// Parse command line arguments to find the pcap file name | ||
for (int idx = 1; idx < argc; ++idx) | ||
{ | ||
if (strcmp(argv[idx], "--pcap-file") == 0) |
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.
Since --pcap-file
is a mandatory parameter (and the only param for now), maybe we don't need the param itself and can run the benchmark like this:
.\BenchmarkExampleGoogle.exe D:\my_packets.pcap
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.
@seladb The problem is arguments are also used by google benchmark. It supports some flags as default, for example --benchmark_filter
or --benchmark_out_format
etc. So --pcap-file
actually not only parameter.
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.
Oh ok, so we can keep it 👍
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.
LGTM, I guess this is just for the tutorial; otherwise, I think the test cases of the benchmarks could be more comprehensive.
Automatically generate performance benchmark information for website using Google BenchmarkAdd a google benchmark based benchmark application