[Groonga-commit] groonga/groonga [command-version] show also default command version.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 9月 15日 (水) 11:13:05 JST


Kouhei Sutou	2010-09-15 02:13:05 +0000 (Wed, 15 Sep 2010)

  New Revision: 59cf63cda10cec1011291fa114776e609ecfd942

  Log:
    show also default command version.

  Modified files:
    lib/proc.c
    test/unit/http/test-http.rb

  Modified: lib/proc.c (+3 -1)
===================================================================
--- lib/proc.c    2010-09-15 02:12:18 +0000 (bed50cd)
+++ lib/proc.c    2010-09-15 02:13:05 +0000 (e941f27)
@@ -384,7 +384,7 @@ proc_status(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
   grn_cache_statistics statistics;
   grn_timeval_now(ctx, &now);
   grn_cache_get_statistics(ctx, &statistics);
-  GRN_OUTPUT_MAP_OPEN("RESULT", 16);
+  GRN_OUTPUT_MAP_OPEN("RESULT", 18);
   GRN_OUTPUT_CSTR("alloc_count");
   GRN_OUTPUT_INT32(grn_alloc_count());
   GRN_OUTPUT_CSTR("starttime");
@@ -403,6 +403,8 @@ proc_status(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
   }
   GRN_OUTPUT_CSTR("command_version");
   GRN_OUTPUT_INT32(grn_ctx_get_command_version(ctx));
+  GRN_OUTPUT_CSTR("default_command_version");
+  GRN_OUTPUT_INT32(grn_get_default_command_version());
   GRN_OUTPUT_CSTR("max_command_version");
   GRN_OUTPUT_INT32(GRN_COMMAND_VERSION_MAX - 1);
   GRN_OUTPUT_MAP_CLOSE();

  Modified: test/unit/http/test-http.rb (+1 -1)
===================================================================
--- test/unit/http/test-http.rb    2010-09-15 02:12:18 +0000 (617f5c9)
+++ test/unit/http/test-http.rb    2010-09-15 02:13:05 +0000 (2bd67aa)
@@ -32,7 +32,7 @@ class HTTPTest < Test::Unit::TestCase
     response = get(command_path(:status))
     assert_equal("application/json", response.content_type)
     assert_equal(["alloc_count", "cache_hit_rate", "command_version",
-                  "max_command_version", "n_queries",
+                  "default_command_version", "max_command_version", "n_queries",
                   "starttime", "uptime", "version"],
                  JSON.parse(response.body)[1].keys.sort)
   end




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