[Groonga-commit] groonga/groonga-query-log at 3bad42d [master] Add missing a method that compute the number of digits

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Sep 20 12:22:53 JST 2013


Kouhei Sutou	2013-09-20 12:22:53 +0900 (Fri, 20 Sep 2013)

  New Revision: 3bad42d71629e98338322e6dfe580e620519f4ac
  https://github.com/groonga/groonga-query-log/commit/3bad42d71629e98338322e6dfe580e620519f4ac

  Message:
    Add missing a method that compute the number of digits

  Modified files:
    lib/groonga/query-log/memory-leak-detector.rb

  Modified: lib/groonga/query-log/memory-leak-detector.rb (+4 -0)
===================================================================
--- lib/groonga/query-log/memory-leak-detector.rb    2013-09-20 12:19:08 +0900 (f553a40)
+++ lib/groonga/query-log/memory-leak-detector.rb    2013-09-20 12:22:53 +0900 (efa9c8f)
@@ -70,6 +70,10 @@ module Groonga
         `ps -o rss --no-header --pid #{@options.pid}`.to_i
       end
 
+      def compute_n_digits(n)
+        (Math.log10(n) + 1).floor
+      end
+
       class Options
         attr_accessor :host
         attr_accessor :port
-------------- next part --------------
HTML����������������������������...
Download 



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