Merge branch 'master' into google-wyhash

pull/13171/head
Joshua Haberman 3 years ago
commit 039975556d
  1. 2
      benchmarks/BUILD.googleapis
  2. 8
      benchmarks/benchmark.cc
  3. 2
      kokoro/ubuntu/build.sh

@ -31,7 +31,7 @@ load(
proto_library( proto_library(
name = "ads_proto", name = "ads_proto",
srcs = glob([ srcs = glob([
"google/ads/googleads/v5/**/*.proto", "google/ads/googleads/v7/**/*.proto",
"google/api/**/*.proto", "google/api/**/*.proto",
"google/rpc/**/*.proto", "google/rpc/**/*.proto",
"google/longrunning/**/*.proto", "google/longrunning/**/*.proto",

@ -31,7 +31,7 @@
#include "benchmarks/descriptor.upb.h" #include "benchmarks/descriptor.upb.h"
#include "benchmarks/descriptor.upbdefs.h" #include "benchmarks/descriptor.upbdefs.h"
#include "benchmarks/descriptor_sv.pb.h" #include "benchmarks/descriptor_sv.pb.h"
#include "google/ads/googleads/v5/services/google_ads_service.upbdefs.h" #include "google/ads/googleads/v7/services/google_ads_service.upbdefs.h"
#include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.pb.h"
#include "upb/def.hpp" #include "upb/def.hpp"
@ -84,7 +84,7 @@ static void BM_LoadAdsDescriptor_Upb(benchmark::State& state) {
size_t bytes_per_iter = 0; size_t bytes_per_iter = 0;
for (auto _ : state) { for (auto _ : state) {
upb::SymbolTable symtab; upb::SymbolTable symtab;
google_ads_googleads_v5_services_SearchGoogleAdsRequest_getmsgdef( google_ads_googleads_v7_services_SearchGoogleAdsRequest_getmsgdef(
symtab.ptr()); symtab.ptr());
bytes_per_iter = _upb_symtab_bytesloaded(symtab.ptr()); bytes_per_iter = _upb_symtab_bytesloaded(symtab.ptr());
} }
@ -111,11 +111,11 @@ static void BM_LoadDescriptor_Proto2(benchmark::State& state) {
BENCHMARK(BM_LoadDescriptor_Proto2); BENCHMARK(BM_LoadDescriptor_Proto2);
static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) { static void BM_LoadAdsDescriptor_Proto2(benchmark::State& state) {
extern upb_def_init google_ads_googleads_v5_services_google_ads_service_proto_upbdefinit; extern upb_def_init google_ads_googleads_v7_services_google_ads_service_proto_upbdefinit;
std::vector<upb_strview> serialized_files; std::vector<upb_strview> serialized_files;
absl::flat_hash_set<const upb_def_init*> seen_files; absl::flat_hash_set<const upb_def_init*> seen_files;
CollectFileDescriptors( CollectFileDescriptors(
&google_ads_googleads_v5_services_google_ads_service_proto_upbdefinit, &google_ads_googleads_v7_services_google_ads_service_proto_upbdefinit,
serialized_files, seen_files); serialized_files, seen_files);
size_t bytes_per_iter = 0; size_t bytes_per_iter = 0;
for (auto _ : state) { for (auto _ : state) {

@ -29,7 +29,7 @@ set -ex
# Install the latest version of Bazel. # Install the latest version of Bazel.
if [ -x "$(command -v use_bazel.sh)" ]; then if [ -x "$(command -v use_bazel.sh)" ]; then
use_bazel.sh latest use_bazel.sh 4.1.0
fi fi
# Verify/query CMake # Verify/query CMake

Loading…
Cancel
Save