[Groonga-commit] droonga/droonga-engine at 8e989be [master] Add options to specify progress interval

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Apr 10 18:44:16 JST 2015


YUKI Hiroshi	2015-04-10 18:44:16 +0900 (Fri, 10 Apr 2015)

  New Revision: 8e989bee62c024e9e89b6bf643b64df59a2a665e
  https://github.com/droonga/droonga-engine/commit/8e989bee62c024e9e89b6bf643b64df59a2a665e

  Message:
    Add options to specify progress interval

  Modified files:
    bin/droonga-engine-absorb-data
    bin/droonga-engine-join

  Modified: bin/droonga-engine-absorb-data (+7 -0)
===================================================================
--- bin/droonga-engine-absorb-data    2015-04-10 18:38:21 +0900 (20e36d3)
+++ bin/droonga-engine-absorb-data    2015-04-10 18:44:16 +0900 (59d7382)
@@ -60,6 +60,7 @@ class AbsorbDataCommand
     options.dataset = Droonga::CatalogGenerator::DEFAULT_DATASET
     options.receiver_host = Socket.gethostname
     options.messages_per_second = Droonga::DataAbsorber::DEFAULT_MESSAGES_PER_SECOND
+    options.progress_interval_seconds = Droonga::DataAbsorber::DEFAULT_PROGRESS_INTERVAL_SECONDS
     options.verbose = false
     parser = OptionParser.new
     parser.version = Droonga::Engine::VERSION
@@ -106,6 +107,11 @@ class AbsorbDataCommand
 
     parser.separator("")
     parser.separator("Miscellaneous:")
+    parser.on("--progress-interval-seconds=N", Integer,
+              "Interval seconds to report progress.",
+              "(#{options.progress_interval_seconds})") do |n|
+      options.progress_interval_seconds = n
+    end
     parser.on("--[no-]verbose",
               "Output details for internal operations.",
               "(#{options.verbose})") do |verbose|
@@ -151,6 +157,7 @@ class AbsorbDataCommand
       :port             => @options.port,
       :tag              => @options.tag,
       :messages_per_second => @options.messages_per_second,
+      :progress_interval_seconds => @options.progress_interval_seconds,
       :client_options   => {
         :backend => :coolio,
         :loop    => @loop,

  Modified: bin/droonga-engine-join (+5 -0)
===================================================================
--- bin/droonga-engine-join    2015-04-10 18:38:21 +0900 (2698453)
+++ bin/droonga-engine-join    2015-04-10 18:44:16 +0900 (6281cca)
@@ -103,6 +103,10 @@ class JoinCommand
                 :default => Droonga::DataAbsorber::DEFAULT_MESSAGES_PER_SECOND)
 
       option.separator("Miscellaneous:")
+      option.on("progress-interval-seconds=",
+                "Interval seconds to report progress.",
+                :as => Integer,
+                :default => Droonga::DataAbsorber::DEFAULT_PROGRESS_INTERVAL_SECONDS)
       option.on(:verbose, "Output details for internal operations.",
                 :default => false)
     end
@@ -163,6 +167,7 @@ class JoinCommand
       :port             => @options[:port],
       :tag              => @options[:tag],
       :messages_per_second => @options["records-per-second"],
+      :progress_interval_seconds => @options["progress-interval-seconds"],
       :client_options   => {
         :backend => :coolio,
         :loop    => @loop,
-------------- next part --------------
HTML����������������������������...
다운로드 



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