Skip to content
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

Merged
merged 94 commits into from
Nov 14, 2024

Conversation

egecetin
Copy link
Collaborator

@egecetin egecetin commented May 11, 2024

Automatically generate performance benchmark information for website using Google Benchmark

Add a google benchmark based benchmark application

@egecetin egecetin requested a review from seladb October 15, 2024 07:12
.github/workflows/build_and_test.yml Outdated Show resolved Hide resolved
Examples/PcapPlusPlus-benchmark/CMakeLists.txt Outdated Show resolved Hide resolved
@egecetin egecetin requested a review from seladb November 3, 2024 19:43
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.14)
Copy link
Collaborator Author

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

@egecetin
Copy link
Collaborator Author

@seladb It is ready to review if you have time

Copy link
Owner

@seladb seladb left a 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)
Copy link
Owner

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

Copy link
Collaborator Author

@egecetin egecetin Nov 13, 2024

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.

Copy link
Owner

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 👍

Copy link
Collaborator

@tigercosmos tigercosmos left a 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.

@egecetin egecetin merged commit 3929558 into seladb:dev Nov 14, 2024
41 checks passed
@egecetin egecetin deleted the benchmark branch November 14, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update benchmark
3 participants