phongn commented on code in PR #13166:
URL: https://github.com/apache/trafficserver/pull/13166#discussion_r3284545990


##########
tools/benchmark/CMakeLists.txt:
##########
@@ -36,6 +36,9 @@ target_link_libraries(benchmark_SharedMutex PRIVATE 
Catch2::Catch2 ts::tscore li
 add_executable(benchmark_Random benchmark_Random.cc)
 target_link_libraries(benchmark_Random PRIVATE Catch2::Catch2WithMain 
ts::tscore)
 
+add_executable(benchmark_ink_base64 benchmark_ink_base64.cc)
+target_link_libraries(benchmark_ink_base64 PRIVATE Catch2::Catch2WithMain 
ts::tscore)

Review Comment:
   Addressed in 0b36457fe — moved correctness into 
`src/tscore/unit_tests/test_ink_base64.cc` and wired it into `test_tscore`. 
Coverage now includes the three contract points you called out (invalid-byte 
truncation, URL-safe alphabet decode, in-place `dst == src`), plus the 
InkAPITest fixture, the whitespace-truncation guarantee from the alignment fix, 
and 1-/2-/3-char tail cases that exercise the scalar restructure. 119 
assertions across 7 cases; runs under ctest on both `ENABLE_SIMDUTF=AUTO` and 
`=OFF` builds.



##########
tools/benchmark/benchmark_ink_base64.cc:
##########
@@ -0,0 +1,205 @@
+/** @file
+
+  Micro benchmark for ats_base64_encode / ats_base64_decode and the bulk
+  scalar tolower path used by URL canonicalization. Establishes a baseline
+  prior to any SIMD work.

Review Comment:
   Done in 0b36457fe — header rewritten to describe what the bench does now 
(scalar-vs-simdutf throughput comparison). Also added 
`Catch::Benchmark::keep_memory` barriers (same DCE issue we addressed on the 
tolower bench) and a config-print TEST_CASE so the output shows which 
implementation is wired in.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to