/*
- * Copyright 2013 Facebook, Inc.
+ * Copyright 2014 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* limitations under the License.
*/
-#include "folly/io/IOBuf.h"
+#include <folly/io/IOBuf.h>
#include <gflags/gflags.h>
-#include "folly/Benchmark.h"
-#include "folly/io/Cursor.h"
+#include <folly/Benchmark.h>
+#include <folly/io/Cursor.h>
#include <vector>
size_t num_bufs = 0;
BENCHMARK(reserveBenchmark, iters) {
- while (--iters) {
+ while (iters--) {
unique_ptr<IOBuf> iobuf1(IOBuf::create(buf_size));
iobuf1->append(buf_size);
for (size_t bufs = num_bufs; bufs > 1; bufs --) {
}
BENCHMARK(chainBenchmark, iters) {
- while (--iters) {
+ while (iters--) {
unique_ptr<IOBuf> iobuf1(IOBuf::create(buf_size));
iobuf1->append(buf_size);
for (size_t bufs = num_bufs; bufs > 1; bufs --) {
}
BENCHMARK(poolBenchmark, iters) {
- while (--iters) {
+ while (iters--) {
unique_ptr<IOBuf> head = std::move(poolGetIOBuf());
for (size_t bufs = num_bufs; bufs > 1; bufs --) {
unique_ptr<IOBuf> iobufNext = std::move(poolGetIOBuf());