From 725bb0cd5a621e54bed509ed862d84b9c14a4d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Dee=20=28J=C5=8Dshin=29?= Date: Tue, 18 Jun 2024 22:38:11 -0700 Subject: [PATCH] Benchmark truncated big string --- test/ctl/string_bench.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/ctl/string_bench.cc b/test/ctl/string_bench.cc index 46c47e604..c59695dd1 100644 --- a/test/ctl/string_bench.cc +++ b/test/ctl/string_bench.cc @@ -136,5 +136,11 @@ main() BENCH(1000000, 1, { ctl::string_view s2(s); }); } + { + ctl::string big_trunc(48, 'a'); + big_trunc.resize(4); + BENCH(1000000, 1, { ctl::string s(big_trunc); }); + } + return 0; }