influxdb/grpc-binary-logger/examples
Carol (Nichols || Goulding) 30fea67701
fix: Move variables within format strings. Thanks clippy!
Changes made automatically using `cargo clippy --fix`.
2023-02-03 13:06:17 -05:00
..
README.md feat: Implement gRPC binary logger (#5473) 2022-09-01 10:57:02 +00:00
client.rs fix: Move variables within format strings. Thanks clippy! 2023-02-03 13:06:17 -05:00
server.rs fix: Move variables within format strings. Thanks clippy! 2023-02-03 13:06:17 -05:00

README.md

example usage

Run server:

cargo run -p grpc-binary-logger --example server

Run client:

cargo run -p grpc-binary-logger --example client

View binary log:

$ go install mkm.pub/binlog
$ binlog stats /tmp/grpcgo_binarylog.bin
Method			[≥0s]	[≥0.05s][≥0.1s]	[≥0.2s]	[≥0.5s]	[≥1s]	[≥10s]	[≥100s]	[errors]
/test.Test/TestUnary	1	0	0	0	0	0	0	0
$ binlog debug /tmp/grpcgo_binarylog.bin
1	EVENT_TYPE_CLIENT_HEADER	/test.Test/TestUnary
1	EVENT_TYPE_CLIENT_MESSAGE
1	EVENT_TYPE_SERVER_HEADER
1	EVENT_TYPE_SERVER_MESSAGE
1	EVENT_TYPE_SERVER_TRAILER
$ binlog view /tmp/grpcgo_binarylog.bin
ID	When				Elapsed	Method			Status
1	2022/08/24 14:33:08.736308	1.217ms	/test.Test/TestUnary	OK