summaryrefslogtreecommitdiff
path: root/benchmarks/stdio_benchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/stdio_benchmark.cpp')
-rw-r--r--benchmarks/stdio_benchmark.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmarks/stdio_benchmark.cpp b/benchmarks/stdio_benchmark.cpp
index 97a03dc32..76e9ddb13 100644
--- a/benchmarks/stdio_benchmark.cpp
+++ b/benchmarks/stdio_benchmark.cpp
@@ -196,3 +196,12 @@ static void BM_stdio_printf_d(benchmark::State& state) {
}
}
BIONIC_BENCHMARK(BM_stdio_printf_d);
+
+static void BM_stdio_printf_1$s(benchmark::State& state) {
+ while (state.KeepRunning()) {
+ char buf[BUFSIZ];
+ snprintf(buf, sizeof(buf), "this is a more typical error message with detail: %1$s",
+ "No such file or directory");
+ }
+}
+BIONIC_BENCHMARK(BM_stdio_printf_1$s);