Kouhei Sutou
null+****@clear*****
Fri Aug 7 14:12:56 JST 2015
Kouhei Sutou 2015-08-07 14:12:56 +0900 (Fri, 07 Aug 2015) New Revision: 70e7b36b94fbae4b7fd8c86476734ec71bf5017b https://github.com/groonga/grntest/commit/70e7b36b94fbae4b7fd8c86476734ec71bf5017b Message: Normalize query to command format Modified files: lib/grntest/query-log-parser.rb Modified: lib/grntest/query-log-parser.rb (+10 -2) =================================================================== --- lib/grntest/query-log-parser.rb 2015-08-07 13:05:44 +0900 (016fc56) +++ lib/grntest/query-log-parser.rb 2015-08-07 14:12:56 +0900 (2955d44) @@ -32,13 +32,21 @@ module Grntest private def normalize_message(mark, message) - if mark != ">" + case mark + when ">" + message = normalize_command(message) + else message = normalize_elapsed_time(message) + message = normalize_cache_content(message) end - message = normalize_cache_content(message) message end + def normalize_command(message) + command = Groonga::Command::Parser.parse(message) + command.to_command_format + end + def normalize_elapsed_time(message) message.gsub(/\A\d{15} /, "0" * 15 + " ") end -------------- next part -------------- HTML����������������������������... 다운로드