[Groonga-commit] droonga/droonga-engine at 2d279a3 [master] Calculate percentage correctly

Back to archive index

YUKI Piro Hiroshi null+****@clear*****
Wed Apr 22 00:35:58 JST 2015


YUKI "Piro" Hiroshi	2015-04-22 00:35:58 +0900 (Wed, 22 Apr 2015)

  New Revision: 2d279a3e5881fca6d558ff4da412db987b3c95c4
  https://github.com/droonga/droonga-engine/commit/2d279a3e5881fca6d558ff4da412db987b3c95c4

  Message:
    Calculate percentage correctly

  Modified files:
    lib/droonga/plugins/system/absorb_data.rb

  Modified: lib/droonga/plugins/system/absorb_data.rb (+1 -1)
===================================================================
--- lib/droonga/plugins/system/absorb_data.rb    2015-04-21 23:18:47 +0900 (fdb60fe)
+++ lib/droonga/plugins/system/absorb_data.rb    2015-04-22 00:35:58 +0900 (32e445a)
@@ -310,7 +310,7 @@ module Droonga
             return 0 if****@dumpe*****_forecasted_messages.zero?
             processed =****@dumpe*****_received_messages + @n_restored_objects
             expected  =****@dumpe*****_forecasted_messages * 2
-            progress  = processed / expected
+            progress  = processed.to_f / expected
             [(progress * 100).to_i, 100].min
           end
 
-------------- next part --------------
HTML����������������������������...
Download 



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