[Groonga-commit] groonga/groonga [master] [query-log][analyzer] fix percent computation.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 6月 8日 (水) 20:48:20 JST


Kouhei Sutou	2011-06-08 11:48:20 +0000 (Wed, 08 Jun 2011)

  New Revision: ed8ee97112b193cc5a3e3186ae84cfd41cbe7b6c

  Log:
    [query-log][analyzer] fix percent computation.

  Modified files:
    tools/groonga-query-log-analyzer.rb

  Modified: tools/groonga-query-log-analyzer.rb (+3 -3)
===================================================================
--- tools/groonga-query-log-analyzer.rb    2011-06-08 11:23:42 +0000 (38c162c)
+++ tools/groonga-query-log-analyzer.rb    2011-06-08 11:48:20 +0000 (dbe58df)
@@ -792,12 +792,12 @@ class GroongaQueryLogAnaylzer
         n_operations = operation_statistics[:n_operations]
         operation = operation_statistics[:represent_operation]
         parameters = [total_elapsed,
-                      total_elapsed / @statistics.total_elapsed % 100,
+                      total_elapsed / @statistics.total_elapsed * 100,
                       n_operations,
-                      n_operations / @statistics.slow_operations.size.to_f % 100,
+                      n_operations / @statistics.slow_operations.size.to_f * 100,
                       operation[:name],
                       operation[:context]]
-        @output.puts(" [%10.6f](%3.2f%%) [%3d](%3.2f%%) %8s: %s" % parameters)
+        @output.puts(" [%10.6f](%4.2f%%) [%3d](%4.2f%%) %8s: %s" % parameters)
       end
     end
 




Groonga-commit メーリングリストの案内
Back to archive index