pubsub-benchwrapper is a gRPC wrapper around the pubsub library for benchmarking purposes.
mvn clean install -DskipTests=true (one time)
cd google-cloud-testing/pubsub-benchwrapper
export PUBSUB_EMULATOR_HOST=localhost:8080
mvn clean install exec:java -DskipTests=true -Dport=8081
Sources are generated as part of the protobuf-maven-plugin plugin, but if you'd like to generate them yourself to see the output you can run:
cd google-cloud-testing/pubsub-benchwrapper
protoc \
--plugin=protoc-gen-grpc-java=build/exe/java_plugin/protoc-gen-grpc-java \
--java_out=src/main/java \
--grpc-java_out=src/main/java \
--proto_path=src/main/proto \
src/main/proto/*.proto
Note that you'll need to delete these, or uncomment the plugin, since multiple definitions of the same class are not allowed.
Note that these should not be committed into git.
Note that you can also mvn compile -DskipTests=true and see sources in
target/generated-sources/.
To debug HTTP requests, place a logging.properties at
google-cloud-testing/pubsub-benchwrapper/logging.properties with the
following contents:
# Properties file which configures the operation of the JDK logging facility.
# The system will look for this config file to be specified as a system property:
# -Djava.util.logging.config.file=${project_loc:googleplus-simple-cmdline-sample}/logging.properties
# Set up the console handler (uncomment "level" to show more fine-grained messages)
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = CONFIG
# Set up logging of HTTP requests and responses (uncomment "level" to show)
com.google.api.client.http.level = CONFIG
