[Groonga-commit] droonga/fluent-plugin-droonga at d4836e6 [master] Benchmark: show incidence in percentage correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Nov 1 17:50:18 JST 2013


YUKI Hiroshi	2013-11-01 17:50:18 +0900 (Fri, 01 Nov 2013)

  New Revision: d4836e6077ce98ef110cc43dbd3c339bd9430752
  https://github.com/droonga/fluent-plugin-droonga/commit/d4836e6077ce98ef110cc43dbd3c339bd9430752

  Message:
    Benchmark: show incidence in percentage correctly

  Modified files:
    benchmark/watch/benchmark-scan.rb

  Modified: benchmark/watch/benchmark-scan.rb (+4 -2)
===================================================================
--- benchmark/watch/benchmark-scan.rb    2013-11-01 17:49:02 +0900 (27375bd)
+++ benchmark/watch/benchmark-scan.rb    2013-11-01 17:50:18 +0900 (e3f99d1)
@@ -115,14 +115,16 @@ options[:n_steps].times do |try_count|
   scan_benchmark.add_keywords(scan_benchmark.n_keywords) if try_count > 0
   puts "\n=============== #{scan_benchmark.n_keywords} keywords ===============\n"
   options[:incidences].split(/[,\s]+/).each do |incidence|
+    incidence = incidence.to_f
     options[:matched_keywords].split(/[,\s]+/).each do |matched_keywords|
+      matched_keywords = matched_keywords.to_i
       condition = "#{incidence * 100}%/#{matched_keywords}match"
       results_for_specific_condition[condition] ||= []
       label = "#{incidence * 100} %/#{matched_keywords} match/#{scan_benchmark.n_keywords} keywords"
       GC.disable
       result = Benchmark.bm do |benchmark|
-        scan_benchmark.prepare_targets(:incidence => incidence.to_f,
-                                       :matched_keywords => matched_keywords.to_i)
+        scan_benchmark.prepare_targets(:incidence => incidence,
+                                       :matched_keywords => matched_keywords)
         benchmark.report(label) do
           scan_benchmark.run
         end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index