grntest 1.6.4 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +12 -0
- data/lib/grntest/test-runner.rb +62 -27
- data/lib/grntest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb9c21dbf97a69dcd226668ff67f8443bf8ab3e57559137c78180ec07c85a147
|
4
|
+
data.tar.gz: 5aa1f037756aa689fff0e5d665fe747ed65d9b2a9f0953015feca997b460a300
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb052fcb4fd03ca1b757cb4fe96f341e9214efd522f8269463267f1be16a6556f1a489e4c1fca6c94934eceff00cdd03002f32e83e6595d4ca4ae941b61ca6d2
|
7
|
+
data.tar.gz: 838ca099c5ea3db31f6754f4b78ec6c5d76de23fe1fd184a5579b0e4eeba399d32c779e4057dc7a6571aa6e011bcbf538b30b25ba2c50191cf278c5495430d12
|
data/doc/text/news.md
CHANGED
data/lib/grntest/test-runner.rb
CHANGED
@@ -664,6 +664,10 @@ http {
|
|
664
664
|
"header" => normalize_header(response["header"]),
|
665
665
|
"body" => normalize_body(response["body"]),
|
666
666
|
})
|
667
|
+
if normalized_response.key?("trace_log")
|
668
|
+
normalized_response["trace_log"] =
|
669
|
+
normalize_trace_log(normalized_response["trace_log"])
|
670
|
+
end
|
667
671
|
else
|
668
672
|
header, *values = response
|
669
673
|
normalized_header = normalize_header(header)
|
@@ -704,40 +708,57 @@ http {
|
|
704
708
|
normalized << schema.to_s
|
705
709
|
end
|
706
710
|
normalized << "\n"
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
when "error_message"
|
715
|
-
value = normalize_error_message(value) if value
|
716
|
-
when "error_file"
|
717
|
-
value = normalize_error_file_path(value) if value
|
718
|
-
when "error_line"
|
719
|
-
value = 0 if value
|
720
|
-
when "error_function"
|
721
|
-
value = normalize_error_function(value) if value
|
722
|
-
end
|
723
|
-
normalized_record << value
|
724
|
-
end
|
725
|
-
normalized_record
|
726
|
-
end
|
727
|
-
noramlized_table = Arrow::Table.new(schema, normalized_records)
|
728
|
-
normalized << noramlized_table.to_s
|
711
|
+
case (schema.metadata || {})["GROONGA:data_type"]
|
712
|
+
when "metadata"
|
713
|
+
normalized_table = normalize_apache_arrow_content_metadata(table)
|
714
|
+
normalized << normalized_table.to_s
|
715
|
+
when "trace_log"
|
716
|
+
normalized_table = normalize_apache_arrow_content_trace_log(table)
|
717
|
+
normalized << normalized_table.to_s
|
729
718
|
else
|
730
719
|
normalized << table.to_s
|
731
720
|
end
|
732
721
|
end
|
733
722
|
end
|
734
|
-
normalized
|
723
|
+
normalize_raw_content(normalized.chomp)
|
724
|
+
end
|
725
|
+
|
726
|
+
def normalize_apache_arrow_content_metadata(table)
|
727
|
+
normalized_records = table.each_record.collect do |record|
|
728
|
+
normalized_record = []
|
729
|
+
record.to_h.each do |name, value|
|
730
|
+
case name
|
731
|
+
when "start_time", "elapsed_time"
|
732
|
+
value = 0
|
733
|
+
when "error_message"
|
734
|
+
value = normalize_error_message(value) if value
|
735
|
+
when "error_file"
|
736
|
+
value = normalize_error_file_path(value) if value
|
737
|
+
when "error_line"
|
738
|
+
value = 0 if value
|
739
|
+
when "error_function"
|
740
|
+
value = normalize_error_function(value) if value
|
741
|
+
end
|
742
|
+
normalized_record << value
|
743
|
+
end
|
744
|
+
normalized_record
|
745
|
+
end
|
746
|
+
Arrow::Table.new(table.schema, normalized_records)
|
735
747
|
end
|
736
748
|
|
737
|
-
def
|
738
|
-
|
739
|
-
|
740
|
-
|
749
|
+
def normalize_apache_arrow_content_trace_log(table)
|
750
|
+
normalized_columns = table.columns.collect do |column|
|
751
|
+
case column.name
|
752
|
+
when "elapsed_time"
|
753
|
+
normalized_elapsed_times =
|
754
|
+
column.data_type.build_array(column.n_rows.times.to_a)
|
755
|
+
Arrow::Column.new(Arrow::Table.new(elapsed_time: normalized_elapsed_times),
|
756
|
+
0)
|
757
|
+
else
|
758
|
+
column
|
759
|
+
end
|
760
|
+
end
|
761
|
+
Arrow::Table.new(table.schema, normalized_columns)
|
741
762
|
end
|
742
763
|
|
743
764
|
def normalize_output_xml(content, options)
|
@@ -833,6 +854,20 @@ http {
|
|
833
854
|
end
|
834
855
|
end
|
835
856
|
|
857
|
+
def normalize_trace_log(trace_log)
|
858
|
+
if trace_log["logs"]
|
859
|
+
elapsed_time_index = trace_log["columns"].index do |column|
|
860
|
+
column["name"] == "elapsed_time"
|
861
|
+
end
|
862
|
+
normalized_elapsed_time = 0
|
863
|
+
trace_log["logs"].each do |log|
|
864
|
+
log[elapsed_time_index] = normalized_elapsed_time
|
865
|
+
normalized_elapsed_time += 1
|
866
|
+
end
|
867
|
+
end
|
868
|
+
trace_log
|
869
|
+
end
|
870
|
+
|
836
871
|
def normalize_error(content)
|
837
872
|
content = normalize_error_message(content)
|
838
873
|
normalize_raw_content(content)
|
data/lib/grntest/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grntest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-10-
|
12
|
+
date: 2023-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: diff-lcs
|