aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchmark
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-01-04 17:48:34 +0300
committerlevlam <levlam@telegram.org>2023-01-04 17:48:34 +0300
commit9f6fc348b125b7ef3b834b1be6de1108c9106af5 (patch)
tree9cfd66980dcab018874fbb11c3d91700aab350f2 /benchmark
parent7effec1abfb40c25758f2054b6a1b673bd134c18 (diff)
Fix bench_misc.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bench_misc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/benchmark/bench_misc.cpp b/benchmark/bench_misc.cpp
index 1cbbbe170..8345438f7 100644
--- a/benchmark/bench_misc.cpp
+++ b/benchmark/bench_misc.cpp
@@ -244,7 +244,13 @@ class WalkPathBench final : public td::Benchmark {
}
void run(int n) final {
int cnt = 0;
- td::rmrf("A/").ignore();
+ td::walk_path("A/", [&](td::CSlice path, auto type) {
+ if (type == td::WalkPath::Type::EnterDir) {
+ return;
+ }
+ td::stat(path).ok();
+ cnt++;
+ }).ignore();
}
void tear_down() final {
td::rmrf("A/").ignore();