Haruka Yoshihara
null+****@clear*****
Mon Dec 17 16:24:13 JST 2012
Haruka Yoshihara 2012-12-17 16:24:13 +0900 (Mon, 17 Dec 2012) New Revision: c9a95442036fbd1969ba201a6fa6cbf6aeb5105d https://github.com/groonga/groonga-query-log/commit/c9a95442036fbd1969ba201a6fa6cbf6aeb5105d Log: test: use the file contenting expected result for test and remove garbage Added files: test/fixtures/multi.expected Modified files: test/test-analyzer.rb Added: test/fixtures/multi.expected (+41 -0) 100644 =================================================================== --- /dev/null +++ test/fixtures/multi.expected 2012-12-17 16:24:13 +0900 (5fe349f) @@ -0,0 +1,41 @@ +Summary: + Threshold: + slow response : 0.2 + slow operation : 0.1 + # of responses : 4 + # of slow responses : 0 + responses/sec : 9.468517046370479e-06 + start time : 2012-12-12 17:39:17.3 + last time : 2012-12-17 15:00:10.1 + period(sec) : 422452.637557779 + slow response ratio : 0.000% + total response time : 0.10129859499999999 + Slow Operations: + +Slow Queries: +1) [2012-12-17 15:00:10.1-2012-12-17 15:00:10.1 (0.05231682)](0): table_create --name Comments --flags TABLE_HASH_KEY --key_type UInt32 name: <table_create> + parameters: + <name>: <Comments> + <flags>: <TABLE_HASH_KEY> + <key_type>: <UInt32> + +2) [2012-12-17 15:00:10.1-2012-12-17 15:00:10.1 (0.04463578)](0): column_create --table Comments --name title --flags COLUMN_SCALAR --type ShortText name: <column_create> + parameters: + <table>: <Comments> + <name>: <title> + <flags>: <COLUMN_SCALAR> + <type>: <ShortText> + +3) [2012-12-12 17:39:17.3-2012-12-12 17:39:17.3 (0.00312886)](0): load --table Video name: <load> + parameters: + <table>: <Video> + +4) [2012-12-12 17:39:17.3-2012-12-12 17:39:17.3 (0.00121714)](0): select --table Users --query follower:@groonga --output_columns _key,name name: <select> + parameters: + <table>: <Users> + <query>: <follower:@groonga> + <output_columns>: <_key,name> + 1) 0.00084295: filter( 2) query: follower:@groonga + 2) 0.00002795: select( 2) + 3) 0.00019585: output( 2) _key,name + Modified: test/test-analyzer.rb (+0 -2) =================================================================== --- test/test-analyzer.rb 2012-12-17 15:36:22 +0900 (31c5d8e) +++ test/test-analyzer.rb 2012-12-17 16:24:13 +0900 (c3dba4f) @@ -35,9 +35,7 @@ class AnalyzerTest < Test::Unit::TestCase def test_multi other_query_log_path = File.join(@fixtures_path, "other-query.log") actual_result = run_analyzer(@query_log_path, other_query_log_path) - expected_result_path = File.join(@fixtures_path, "multi.expected") - File.open(expected_result_path, "w") {|f| f.puts(actual_result)} assert_equal(File.read(expected_result_path), actual_result) end -------------- next part -------------- HTML����������������������������...Download