Kouhei Sutou
null+****@clear*****
Wed Aug 12 15:31:50 JST 2015
Kouhei Sutou 2015-08-12 15:31:50 +0900 (Wed, 12 Aug 2015) New Revision: 5bfdb0cf1663638c55f3ac8b385dca9b6fb653e2 https://github.com/groonga/groonga-query-log/commit/5bfdb0cf1663638c55f3ac8b385dca9b6fb653e2 Message: Show smaller value rather than second of start/last time Modified files: lib/groonga/query-log/analyzer/statistic.rb test/test-analyzer.rb Modified: lib/groonga/query-log/analyzer/statistic.rb (+2 -2) =================================================================== --- lib/groonga/query-log/analyzer/statistic.rb 2015-07-22 10:24:29 +0900 (071a87e) +++ lib/groonga/query-log/analyzer/statistic.rb 2015-08-12 15:31:50 +0900 (ef4a648) @@ -120,8 +120,8 @@ module Groonga def to_hash data = { - "start_time" => start_time.to_i, - "last_time" => last_time.to_i, + "start_time" => start_time.to_f, + "last_time" => last_time.to_f, "elapsed" => elapsed_in_seconds, "return_code" => return_code, "slow" => slow?, Modified: test/test-analyzer.rb (+2 -2) =================================================================== --- test/test-analyzer.rb 2015-07-22 10:24:29 +0900 (2e14f37) +++ test/test-analyzer.rb 2015-08-12 15:31:50 +0900 (d1313ff) @@ -96,8 +96,8 @@ class AnalyzerTest < Test::Unit::TestCase end def normalize_json(json) - json = json.gsub(/("start_time"):\d+/, "\\1:START_TIME") - json.gsub(/("last_time"):\d+/, "\\1:LAST_TIME") + json = json.gsub(/("start_time"):\d+(?:\.\d+)/, "\\1:START_TIME") + json.gsub(/("last_time"):\d+(?:\.\d+)/, "\\1:LAST_TIME") end def expected_analyzed_query(file_name) -------------- next part -------------- HTML����������������������������... 다운로드