Skip to content

Carry on from #13468, simplify bazel consumption of grpc#13561

Merged
apolcyn merged 3 commits intogrpc:masterfrom
apolcyn:revise_bazel_api
Dec 15, 2017
Merged

Carry on from #13468, simplify bazel consumption of grpc#13561
apolcyn merged 3 commits intogrpc:masterfrom
apolcyn:revise_bazel_api

Conversation

@apolcyn
Copy link
Copy Markdown
Contributor

@apolcyn apolcyn commented Nov 30, 2017

This PR carries on from #13468, and the most recent (3rd) commit here follows the suggestion in a comment on that PR.

Used the greeter_server (with everything protobuf-related removed) to test use-of-grpc-in-bazel from a local 3rd party project using a BUILD rule that looks like:

cc_binary(
    name = "greeter_server",
    srcs = ["cpp/helloworld/greeter_server.cc"],
    deps = ["@com_github_grpc_grpc//:grpc++"],
)

and a WORKSPACE file of:

local_repository(
  name = "com_github_grpc_grpc",
  path = "/grpc",

)

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
grpc_deps()

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@apolcyn apolcyn changed the title Carry on from #13468, simplify bazel consumption of grpc WIP: Carry on from #13468, simplify bazel consumption of grpc Nov 30, 2017
@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

Corrupt JSON data (indicates timeout or crash): 
    bm_fullstack_streaming_pump.BM_PumpStreamServerToClient_InProcessCHTTP2__1.opt.old: 1


[microbenchmarks] No significant performance differences

@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Nov 30, 2017

I think this is ready for review now

@apolcyn apolcyn changed the title WIP: Carry on from #13468, simplify bazel consumption of grpc Carry on from #13468, simplify bazel consumption of grpc Nov 30, 2017
@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

1 similar comment
@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
  +2.7%     +80 src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc                +80  +2.7%
      +8.2%     +40 grpc_grpclb_response_parse_serverlist                                                    +40  +8.2%
       +11%     +24 grpc_grpclb_serverlist_copy                                                              +24   +11%
       +18%     +21 grpc_grpclb_serverlist_equals                                                            +21   +18%

 -------------- SHRINKING                                                                            --------------
  -1.8%    -272 src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc                          -272  -1.8%
      [DEL] -1.67Ki rr_handover_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.10]                  -1.67Ki  [DEL]
      [DEL] -1.28Ki query_for_backends_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.8]            -1.28Ki  [DEL]
      [DEL]    -834 build_lb_channel_args(grpc_exec_ctx*, grpc_lb_addresses const*, grpc_fake_resolver_r    -834  [DEL]
      [DEL]    -235 glb_ping_one_locked                                                                     -235  [DEL]
     -17.5%    -112 glb_shutdown_locked                                                                     -112 -17.5%
  -1.0%    -144 src/core/ext/filters/client_channel/client_channel.cc                                   -144  -1.0%
     -17.8%    -144 start_transport_op_locked                                                               -144 -17.8%
      -1.8%      -3 cc_start_transport_op                                                                     -3  -1.8%
  -2.2%    -112 src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc                  -112  -2.2%
      [DEL]    -341 pf_ping_one_locked                                                                      -341  [DEL]
  -1.9%    -112 src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc                -112  -1.9%
      [DEL]    -415 rr_ping_one_locked                                                                      -415  [DEL]
  -7.5%    -112 src/core/lib/surface/lame_client.cc                                                     -112  -7.5%
     -27.8%    -115 grpc_core::(anonymous namespace)::lame_start_transport_op                               -115 -27.8%
  -3.0%     -64 src/core/lib/transport/transport_op_string.cc                                            -64  -3.0%
      -8.4%     -75 grpc_transport_op_string                                                                 -75  -8.4%
  -0.0%     -16 src/core/ext/transport/chttp2/transport/chttp2_transport.cc                              -16  -0.0%
      -6.1%     -16 perform_transport_op_locked                                                              -16  -6.1%
      -3.2%      -3 perform_transport_op                                                                      -3  -3.2%

 -+-+-+-+-+-+-+ MIXED                                                                                +-+-+-+-+-+-+-
  +0.0%      +8 [None]                                                                               -8.95Ki  -0.2%
      +2.7%     +32 [None]                                                                                     0  [ = ]
       +50%     +14 grpc_lb_v1_ServerList_fields                                                             +14   +50%

  -0.1%    -744 TOTAL                                                                                -9.68Ki  -0.2%


****************************************************************

libgrpc++.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +16  +0.0%

  [ = ]       0 TOTAL      +16  +0.0%



@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
  +2.7%     +80 src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc                +80  +2.7%
      +8.2%     +40 grpc_grpclb_response_parse_serverlist                                                    +40  +8.2%
       +11%     +24 grpc_grpclb_serverlist_copy                                                              +24   +11%
       +18%     +21 grpc_grpclb_serverlist_equals                                                            +21   +18%

 -------------- SHRINKING                                                                            --------------
  -1.8%    -272 src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc                          -272  -1.8%
      [DEL] -1.67Ki rr_handover_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.10]                  -1.67Ki  [DEL]
      [DEL] -1.28Ki query_for_backends_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.8]            -1.28Ki  [DEL]
      [DEL]    -834 build_lb_channel_args(grpc_exec_ctx*, grpc_lb_addresses const*, grpc_fake_resolver_r    -834  [DEL]
      [DEL]    -235 glb_ping_one_locked                                                                     -235  [DEL]
     -17.5%    -112 glb_shutdown_locked                                                                     -112 -17.5%
  -1.0%    -144 src/core/ext/filters/client_channel/client_channel.cc                                   -144  -1.0%
     -17.8%    -144 start_transport_op_locked                                                               -144 -17.8%
      -1.8%      -3 cc_start_transport_op                                                                     -3  -1.8%
  -2.2%    -112 src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc                  -112  -2.2%
      [DEL]    -341 pf_ping_one_locked                                                                      -341  [DEL]
  -1.9%    -112 src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc                -112  -1.9%
      [DEL]    -415 rr_ping_one_locked                                                                      -415  [DEL]
  -7.5%    -112 src/core/lib/surface/lame_client.cc                                                     -112  -7.5%
     -27.8%    -115 grpc_core::(anonymous namespace)::lame_start_transport_op                               -115 -27.8%
  -3.0%     -64 src/core/lib/transport/transport_op_string.cc                                            -64  -3.0%
      -8.4%     -75 grpc_transport_op_string                                                                 -75  -8.4%
  -0.0%     -16 src/core/ext/transport/chttp2/transport/chttp2_transport.cc                              -16  -0.0%
      -6.1%     -16 perform_transport_op_locked                                                              -16  -6.1%
      -3.2%      -3 perform_transport_op                                                                      -3  -3.2%

 -+-+-+-+-+-+-+ MIXED                                                                                +-+-+-+-+-+-+-
  +0.0%      +8 [None]                                                                               -8.95Ki  -0.2%
      +2.7%     +32 [None]                                                                                     0  [ = ]
       +50%     +14 grpc_lb_v1_ServerList_fields                                                             +14   +50%

  -0.1%    -744 TOTAL                                                                                -9.68Ki  -0.2%


****************************************************************

libgrpc++.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +16  +0.0%

  [ = ]       0 TOTAL      +16  +0.0%



1 similar comment
@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE                                                                                            FILE SIZE
 ++++++++++++++ GROWING                                                                              ++++++++++++++
  +2.7%     +80 src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc                +80  +2.7%
      +8.2%     +40 grpc_grpclb_response_parse_serverlist                                                    +40  +8.2%
       +11%     +24 grpc_grpclb_serverlist_copy                                                              +24   +11%
       +18%     +21 grpc_grpclb_serverlist_equals                                                            +21   +18%

 -------------- SHRINKING                                                                            --------------
  -1.8%    -272 src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc                          -272  -1.8%
      [DEL] -1.67Ki rr_handover_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.10]                  -1.67Ki  [DEL]
      [DEL] -1.28Ki query_for_backends_locked(grpc_exec_ctx*, glb_lb_policy*) [clone .part.8]            -1.28Ki  [DEL]
      [DEL]    -834 build_lb_channel_args(grpc_exec_ctx*, grpc_lb_addresses const*, grpc_fake_resolver_r    -834  [DEL]
      [DEL]    -235 glb_ping_one_locked                                                                     -235  [DEL]
     -17.5%    -112 glb_shutdown_locked                                                                     -112 -17.5%
  -1.0%    -144 src/core/ext/filters/client_channel/client_channel.cc                                   -144  -1.0%
     -17.8%    -144 start_transport_op_locked                                                               -144 -17.8%
      -1.8%      -3 cc_start_transport_op                                                                     -3  -1.8%
  -2.2%    -112 src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc                  -112  -2.2%
      [DEL]    -341 pf_ping_one_locked                                                                      -341  [DEL]
  -1.9%    -112 src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc                -112  -1.9%
      [DEL]    -415 rr_ping_one_locked                                                                      -415  [DEL]
  -7.5%    -112 src/core/lib/surface/lame_client.cc                                                     -112  -7.5%
     -27.8%    -115 grpc_core::(anonymous namespace)::lame_start_transport_op                               -115 -27.8%
  -3.0%     -64 src/core/lib/transport/transport_op_string.cc                                            -64  -3.0%
      -8.4%     -75 grpc_transport_op_string                                                                 -75  -8.4%
  -0.0%     -16 src/core/ext/transport/chttp2/transport/chttp2_transport.cc                              -16  -0.0%
      -6.1%     -16 perform_transport_op_locked                                                              -16  -6.1%
      -3.2%      -3 perform_transport_op                                                                      -3  -3.2%

 -+-+-+-+-+-+-+ MIXED                                                                                +-+-+-+-+-+-+-
  +0.0%      +8 [None]                                                                               -8.95Ki  -0.2%
      +2.7%     +32 [None]                                                                                     0  [ = ]
       +50%     +14 grpc_lb_v1_ServerList_fields                                                             +14   +50%

  -0.1%    -744 TOTAL                                                                                -9.68Ki  -0.2%


****************************************************************

libgrpc++.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +16  +0.0%

  [ = ]       0 TOTAL      +16  +0.0%



@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Dec 8, 2017

I think this is good for a look again, changed the sanity check to use exec rather than parsing

PTAL

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

3 similar comments
@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

Corrupt JSON data (indicates timeout or crash): 
    bm_fullstack_streaming_ping_pong.BM_StreamingPingPong_InProcessCHTTP2_NoOpMutator_NoOpMutator__4096_2.opt.new: 1


[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

1 similar comment
@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Dec 15, 2017

squashing down my commits to 1

Ning Ren and others added 3 commits December 14, 2017 17:37
…sued by other projects, and simplifies cares build.
…s dependency check.

Otherwise include "third_party/nanopb/pb.h" will find local ph.h rather than the one in "//external:nanopb".
@grpc-testing
Copy link
Copy Markdown

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]


****************************************************************

libgrpc++.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]



@grpc-testing
Copy link
Copy Markdown

[trickle] No significant performance differences

@grpc-testing
Copy link
Copy Markdown

[microbenchmarks] No significant performance differences

@apolcyn
Copy link
Copy Markdown
Contributor Author

apolcyn commented Dec 15, 2017

@apolcyn apolcyn merged commit dd1dbca into grpc:master Dec 15, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants