Skip to content

Commit

Permalink
Complete microbenchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Feb 17, 2017
1 parent 19f3ea2 commit f4ea01b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions .clang_complete
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
-Igens
-I.
-Ithird_party/boringssl/include
-Ithird_party/benchmark/include
-Ithird_party/zlib
-Ithird_party/protobuf/src
2 changes: 2 additions & 0 deletions test/core/util/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ cc_library(
"reconnect_server.c",
"slice_splitter.c",
"test_tcp_server.c",
"trickle_endpoint.c",
],
hdrs = [
"debugger_macros.h",
"trickle_endpoint.h",
"grpc_profiler.h",
"mock_endpoint.h",
"parse_hexstring.h",
Expand Down
14 changes: 13 additions & 1 deletion test/cpp/microbenchmarks/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,17 @@ licenses(["notice"]) # 3-clause BSD
cc_test(
name = "noop-benchmark",
srcs = ["noop-benchmark.cc"],
deps = ["//:grpc++", "//external:benchmark"],
deps = ["//external:benchmark"],
)

cc_test(
name = "bm_fullstack",
srcs = ["bm_fullstack.cc"],
deps = ["//:grpc++", "//external:benchmark", "//test/core/util:grpc_test_util", "//src/proto/grpc/testing:echo_proto"],
)

cc_test(
name = "bm_closure",
srcs = ["bm_closure.cc"],
deps = ["//:grpc", "//external:benchmark"],
)
3 changes: 1 addition & 2 deletions test/cpp/microbenchmarks/bm_closure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

/* Test various closure related operations */

#include <benchmark/benchmark.h>
#include <grpc/grpc.h>

extern "C" {
Expand All @@ -41,8 +42,6 @@ extern "C" {
#include "src/core/lib/iomgr/exec_ctx.h"
}

#include "third_party/benchmark/include/benchmark/benchmark.h"

static class InitializeStuff {
public:
InitializeStuff() { grpc_init(); }
Expand Down
2 changes: 1 addition & 1 deletion test/cpp/microbenchmarks/bm_fullstack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include <sstream>

#include <benchmark/benchmark.h>
#include <grpc++/channel.h>
#include <grpc++/create_channel.h>
#include <grpc++/impl/grpc_library.h>
Expand Down Expand Up @@ -63,7 +64,6 @@ extern "C" {
#include "src/core/lib/profiling/timers.h"
#include "src/cpp/client/create_channel_internal.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "third_party/benchmark/include/benchmark/benchmark.h"

namespace grpc {
namespace testing {
Expand Down

0 comments on commit f4ea01b

Please sign in to comment.