grntest 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e19e5b6921dc29cf9645c976831b737b6bb94da8272e7a3cf7d85db0fa3a82f0
4
- data.tar.gz: 5363b7f2169b9c15a4c3e3eaa26db86cde8ec741fd8b5471bbb108c193ed7191
3
+ metadata.gz: 44cf9927ecd7ae571341f3eace1b1c385a7c0bff54580152c49b506fa615392a
4
+ data.tar.gz: e61fa58c6eabab76c080ccb058a1750f9ca1d97c147ceb44b8e1f38a4ee3cf1b
5
5
  SHA512:
6
- metadata.gz: aa315b1549c5688029785250abf0cc5e5e9033dc9246249ffa086d4c3040c617c007fdd52ed6091a8f539d8013bd88487936fd14bb25246daa57fecbd7bd5ec9
7
- data.tar.gz: 0cd8d9dcec896b8fa02f42316aaebe83e8078ea81bbfabfabded590bbc70bd8342960f372b201d59ad3a1864801c6b0f1aab7dff0f136804586ab995a1f46fcc
6
+ metadata.gz: 0d1224453444660d89607d63f5993b0c2079d9a5f6550a651aac42bcbce89b4449c18e833023d018a25dca1445147817a3fa00a81595a49972b909007a939b37
7
+ data.tar.gz: 505fbbc841a6ce1fbc59a2cb507145db60f359d78d49b4179b754156734817035ba85fe19bbd9c47ffd0495c16a3d9c9f1b9dd6b3bb3130cec2e14765f12142d
data/doc/text/news.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # News
2
2
 
3
+ ## 1.7.2: 2024-02-06
4
+
5
+ ### Improvements
6
+
7
+ * arrow: Added support for empty result.
8
+
9
+ * reporter: benchmark-json: Added support for reporting memory leak
10
+ information.
11
+
12
+ * reporter: benchmark-json: Added interface and in/out types to
13
+ benchmark name.
14
+
15
+ ## 1.7.1: 2024-02-05
16
+
17
+ ### Improvements
18
+
19
+ * benchmark: Removed load preparation part from elapsed time.
20
+
3
21
  ## 1.7.0: 2024-02-05
4
22
 
5
23
  ### Fixes
@@ -29,12 +29,12 @@ module Grntest
29
29
  ensure
30
30
  cpu_finish_time = Process.times
31
31
  real_finish_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
32
- @cpu_elapsed_time =
32
+ @cpu_elapsed_time +=
33
33
  (cpu_finish_time.utime - cpu_start_time.utime) +
34
34
  (cpu_finish_time.stime - cpu_start_time.stime) +
35
35
  (cpu_finish_time.cutime - cpu_start_time.cutime) +
36
36
  (cpu_finish_time.cstime - cpu_start_time.cstime)
37
- @real_elapsed_time = real_finish_time - real_start_time
37
+ @real_elapsed_time += real_finish_time - real_start_time
38
38
  end
39
39
  end
40
40
  end
@@ -646,11 +646,9 @@ module Grntest
646
646
  timeout = @context.timeout
647
647
  response = nil
648
648
  begin
649
- @benchmark_result.measure do
650
- @benchmark_result.n_iterations.times do
651
- Timeout.timeout(timeout) do
652
- response = send_command(command)
653
- end
649
+ @benchmark_result.n_iterations.times do
650
+ Timeout.timeout(timeout) do
651
+ response = send_command(command)
654
652
  end
655
653
  end
656
654
  rescue Timeout::Error
@@ -127,15 +127,17 @@ module Grntest
127
127
  request = Net::HTTP::Post.new(path)
128
128
  request.content_type = content_type
129
129
  set_request_body(request, body)
130
- run_http_request(url) do
131
- http = Net::HTTP.new(@host, @port)
132
- http.set_debug_output($stderr) if LOAD_DEBUG
133
- response = http.start do
134
- http.read_timeout = read_timeout
135
- http.request(request)
130
+ @benchmark_result.measure do
131
+ run_http_request(url) do
132
+ http = Net::HTTP.new(@host, @port)
133
+ http.set_debug_output($stderr) if LOAD_DEBUG
134
+ response = http.start do
135
+ http.read_timeout = read_timeout
136
+ http.request(request)
137
+ end
138
+ check_response(response)
139
+ normalize_response_data(command, response.body)
136
140
  end
137
- check_response(response)
138
- normalize_response_data(command, response.body)
139
141
  end
140
142
  end
141
143
 
@@ -150,15 +152,17 @@ module Grntest
150
152
  request = Net::HTTP::Get.new(path_with_query)
151
153
  end
152
154
  url = "http://#{@host}:#{@port}#{path_with_query}"
153
- run_http_request(url) do
154
- http = Net::HTTP.new(@host, @port)
155
- http.set_debug_output($stderr) if DEBUG
156
- response = http.start do
157
- http.read_timeout = read_timeout
158
- http.request(request)
155
+ @benchmark_result.measure do
156
+ run_http_request(url) do
157
+ http = Net::HTTP.new(@host, @port)
158
+ http.set_debug_output($stderr) if DEBUG
159
+ response = http.start do
160
+ http.read_timeout = read_timeout
161
+ http.request(request)
162
+ end
163
+ check_response(response)
164
+ normalize_response_data(command, response.body)
159
165
  end
160
- check_response(response)
161
- normalize_response_data(command, response.body)
162
166
  end
163
167
  end
164
168
 
@@ -29,16 +29,18 @@ module Grntest
29
29
  if !command.key?(:output_type) and @output_type
30
30
  command_line = command_line.sub(/$/, " --output_type #{@output_type}")
31
31
  end
32
- begin
33
- debug_input(command_line)
34
- @input.print(command_line)
35
- @input.print("\n")
36
- @input.flush
37
- rescue SystemCallError
38
- message = "failed to write to groonga: <#{command_line}>: #{$!}"
39
- raise Error.new(message)
32
+ @benchmark_result.measure do
33
+ begin
34
+ debug_input(command_line)
35
+ @input.print(command_line)
36
+ @input.print("\n")
37
+ @input.flush
38
+ rescue SystemCallError
39
+ message = "failed to write to groonga: <#{command_line}>: #{$!}"
40
+ raise Error.new(message)
41
+ end
42
+ read_output(command)
40
43
  end
41
- read_output(command)
42
44
  end
43
45
 
44
46
  def ensure_groonga_ready
@@ -66,6 +66,13 @@ module Grntest
66
66
  end
67
67
 
68
68
  def on_test_leak(worker, result)
69
+ output, @output = @output, $stderr
70
+ begin
71
+ puts
72
+ report_test(worker, result)
73
+ ensure
74
+ @output = output
75
+ end
69
76
  end
70
77
 
71
78
  def on_test_omission(worker, result)
@@ -76,11 +83,14 @@ module Grntest
76
83
 
77
84
  def on_test_finish(worker, result)
78
85
  return if result.benchmarks.empty?
79
- print(",") unless @first_benchmark
80
- puts
81
- benchmarks = result.benchmarks.collect do |benchmark|
82
- name = "#{worker.suite_name}/#{result.test_name}"
83
- <<-JSON.chomp
86
+ result.benchmarks.each do |benchmark|
87
+ print(",") unless @first_benchmark
88
+ @first_benchmark = false
89
+ puts
90
+ name = "#{@tester.interface}: " +
91
+ "#{@tester.input_type}|#{@tester.output_type}: " +
92
+ "#{worker.suite_name}/#{result.test_name}"
93
+ print(<<-JSON.chomp)
84
94
  {
85
95
  "name": #{name.to_json},
86
96
  "run_name": #{benchmark.name.to_json},
@@ -93,8 +103,6 @@ module Grntest
93
103
  }
94
104
  JSON
95
105
  end
96
- print(benchmarks.join(",\n"))
97
- @first_benchmark = false
98
106
  end
99
107
 
100
108
  def on_suite_finish(worker)
@@ -714,9 +714,8 @@ http {
714
714
  Arrow::BufferInputStream.open(buffer) do |input|
715
715
  while input.tell < content.bytesize
716
716
  reader = Arrow::RecordBatchStreamReader.new(input)
717
- schema = reader.schema
718
- record_batches = reader.to_a
719
- table = Arrow::Table.new(schema, record_batches)
717
+ table = reader.read_all
718
+ schema = table.schema
720
719
  unless normalized.empty?
721
720
  normalized << "=" * 40
722
721
  normalized << "\n"
@@ -14,5 +14,5 @@
14
14
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
16
  module Grntest
17
- VERSION = "1.7.0"
17
+ VERSION = "1.7.2"
18
18
  end
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.7.0
4
+ version: 1.7.2
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: 2024-02-05 00:00:00.000000000 Z
12
+ date: 2024-02-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: diff-lcs