]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Merge branch 'develop' into wip-isildur-g-cppcheck56
authorg. economou <8426352+isildur-g@users.noreply.github.com>
Wed, 24 Apr 2024 13:13:39 +0000 (16:13 +0300)
committerGitHub <noreply@github.com>
Wed, 24 Apr 2024 13:13:39 +0000 (16:13 +0300)
1  2 
benchmarks/benchmarks.cpp
tools/hsbench/engine_hyperscan.cpp

index 5dc08ee44398c99f32a1c1c1d1ab0aef382a2e86,92806321f4dfee6ea5bd7bb651194e34fe0069f4..ff6496a612bf32e85bf1a0ebc26223b86fecf9c8
@@@ -100,11 -102,11 +102,10 @@@ static void run_benchmarks(int size, in
          }
          avg_time /= max_matches;
          avg_bw /= max_matches;
-       total_sec /= 1000000.0;
+         total_sec /= 1000000.0;
          /*convert average time to us*/
-         printf(KMAG "%s: %d matches, %d * %d iterations," KBLU " total elapsed time =" RST " %.3f s, " 
-                KBLU "average time per call =" RST " %.3f μs," KBLU " max bandwidth = " RST " %.3f MB/s," KBLU " average bandwidth =" RST " %.3f MB/s \n",
 -        printf("%-18s, %-12u, %-10u, %-6u, %-10.3f, %-9.3f, %-8.3f, %-7.3f\n",
 -               bench.label, max_matches, size, loops, total_sec, avg_time,
 -               max_bw, avg_bw);
++        printf("%-18s, %-12d, %-10d, %-6d, %-10.3f, %-9.3f, %-8.3f, %-7.3f\n",
 +               bench.label, max_matches, size ,loops, total_sec, avg_time, max_bw, avg_bw);
      } else {
          auto start = std::chrono::steady_clock::now();
          for (int i = 0; i < loops; i++) {
          max_bw = total_size / total_sec;
          /*convert to MB/s*/
          max_bw /= 1048576.0;
-         printf(KMAG "%s: no matches, %d * %d iterations," KBLU " total elapsed time =" RST " %.3f s, " 
-                KBLU "average time per call =" RST " %.3f μs ," KBLU " bandwidth = " RST " %.3f MB/s \n",
 -        printf("%-18s, %-12s, %-10u, %-6u, %-10.3f, %-9.3f, %-8.3f, %-7s\n",
 -               bench.label, "0", size, loops, total_sec, avg_time, max_bw, "0");
++        printf("%-18s, %-12s, %-10d, %-6d, %-10.3f, %-9.3f, %-8.3f, %-7s\n",
 +               bench.label, size ,loops, total_sec, avg_time, max_bw );
      }
  }
  
Simple merge