Questions tagged [google-benchmark]

84 questions
0
votes
0 answers

properly & efficiently return an Eigen::Matrix (with lazy evaluation)

As explained in the docs, one should pay attention when using auto type deduction with eigen. e.g. the following function segfaults for me, and I'm okay with that: struct MultiplyAdd{ Eigen::Matrix mult; Eigen::Matrix
pseyfert
  • 3,263
  • 3
  • 21
  • 47
0
votes
1 answer

How to benchmark custom interface using google benchmark

since I can't find really good resource or documentation besides what's on the github readme, I'll ask the community here. Assuming that I have an interface called Base, and multiple derived types. I want to benchmark a virtual function Foo of all…
Jorayen
  • 1,737
  • 2
  • 21
  • 52
0
votes
0 answers

Google benchmark does not write to output file

I am using google benchmark to test performances of two algorithms. However, benchmark_out command seems to not work for me. 1) flags --benchmart_out=/home/knn.json --benchmark_format=json give error invalid file name: '/home/knn.json 2) flags…
Skanda
  • 145
  • 4
  • 14
0
votes
1 answer

How to benchmark packet processing functions using Google benchmark? Basically functions that are repeated with state constraints?

Basically I want to measure the time while traversing over a packet dump file. Looking at the google benchmark documentation, I have come with: BENCHMARK_DEFINE_F(MyFixture, FooTest)(benchmark::State& state) { for (auto _ : state) { //…
themagicalyang
  • 2,493
  • 14
  • 21
0
votes
0 answers

How to benchmark one function in one full application run with google benchmark?

The application workflow is something like this: init(); while(packet.read()) { if (filterpacket(packet)) process(packet); // function to benchmark. } Over the course of one full application run, I need the measure the time of…
themagicalyang
  • 2,493
  • 14
  • 21
0
votes
1 answer

Missing user and channel fields in google-benchmark conan package

I am trying to install the google benchmark library using the C++ package manager Conan. However, the user and channel fields seem to be missing from the conan-center. I also get an error if I try to search for the library on the…
Touloudou
  • 2,079
  • 1
  • 17
  • 28
0
votes
0 answers

google benchmark report time for cpu is incorrect

I am using benchmark::RegisterBenchmark for benchmarking my code. For simple example I have : static void BM_Factorial(benchmark::State& state) { std::string x = "hello"; for (auto _ : state) { uint64_t fact = 1; for(int i=4; i< 100000;…
debonair
  • 2,505
  • 4
  • 33
  • 73
-1
votes
1 answer

How can I understand these symbols in a C++ code?

Why the posix_memalign is written as ::posix_memalign? What is memory here? I am looking to benchmark the read and write speeds of my cache memories and RAM. For this purpose, I want to use google benchmark library and I saw an example code that…
aikhs
  • 949
  • 2
  • 8
  • 20
-3
votes
1 answer

Benchmarking CUDA with googlebenchmark core dumps

I'm attempting to benchmark some CUDA code using google benchmark. To start, I haven't written any CUDA code, and just want to make sure I can benchmark a host function compiled with nvcc. In main.cu I have #include size_t…
user14717
  • 4,757
  • 2
  • 44
  • 68
1 2 3 4 5
6