fix HHWheelTimer comment typo
[folly.git] / folly / io / test / IOBufCursorBenchmark.cpp
index e7142d9c214cfc84cdca3d474eb84991ff9bd4e8..465691c0dc71503645ec4e266e9a9c56fc808f79 100644 (file)
@@ -20,7 +20,6 @@
 #include <folly/Format.h>
 #include <folly/Range.h>
 #include <folly/io/Cursor.h>
-#include <folly/io/Cursor-defs.h>
 
 DECLARE_bool(benchmark);
 
@@ -70,12 +69,22 @@ BENCHMARK(skipBenchmark, iters) {
   while (iters--) {
     Cursor c(iobuf_read_benchmark.get());
     for (int i = 0; i < benchmark_size; i++) {
-      c.peek();
+      c.peekBytes();
       c.skip(1);
     }
   }
 }
 
+BENCHMARK(cloneBenchmark, iters) {
+  folly::IOBuf out;
+  while (iters--) {
+    Cursor c(iobuf_read_benchmark.get());
+    for (int i = 0; i < benchmark_size; ++i) {
+      c.clone(out, 1);
+    }
+  }
+}
+
 // fbmake opt
 // _bin/folly/experimental/io/test/iobuf_cursor_test -benchmark
 //