bkietz commented on a change in pull request #9458:
URL: https://github.com/apache/arrow/pull/9458#discussion_r582125352



##########
File path: dev/archery/tests/test_benchmarks.py
##########
@@ -65,6 +69,123 @@ def assert_benchmark(name, google_result, archery_result):
     assert json.loads(result) == archery_result
 
 
+def test_items_per_second():
+    name = "ArrayArrayKernel<AddChecked, UInt8Type>/32768/0"
+    google_result = {
+        "cpu_time": 116292.58886653671,
+        "items_per_second": 281772039.9844759,
+        "iterations": 5964,
+        "name": name,
+        "null_percent": 0.0,
+        "real_time": 119811.77313729875,
+        "repetition_index": 0,
+        "repetitions": 0,
+        "run_name": "ArrayArrayKernel<AddChecked, UInt8Type>/32768/0",
+        "run_type": "iteration",
+        "size": 32768.0,
+        "threads": 1,
+        "time_unit": "ns",
+    }
+    archery_result = {
+        "name": name,
+        "unit": "items_per_second",
+        "less_is_better": False,
+        "values": [281772039.9844759],
+        "time_unit": "ns",
+        "times": [119811.77313729875],
+    }
+    assert "items_per_second" in google_result
+    assert "bytes_per_second" not in google_result
+    assert_benchmark(name, google_result, archery_result)
+
+
+def test_bytes_per_second():
+    name = "BufferOutputStreamLargeWrites/real_time"
+    google_result = {
+        "bytes_per_second": 1890209037.3405428,
+        "cpu_time": 17018127.659574457,
+        "iterations": 47,
+        "name": name,
+        "real_time": 17458386.53190963,
+        "repetition_index": 1,
+        "repetitions": 0,
+        "run_name": "BufferOutputStreamLargeWrites/real_time",

Review comment:
       Is the duplication intended?
   ```suggestion
           "run_name": name,
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to