Skip to content

Instantly share code, notes, and snippets.

@ian-p-cooke
Last active July 30, 2020 10:02
Show Gist options
  • Save ian-p-cooke/0041f4c9bcd11a685ec1961241040ea0 to your computer and use it in GitHub Desktop.
Save ian-p-cooke/0041f4c9bcd11a685ec1961241040ea0 to your computer and use it in GitHub Desktop.
BEFORE:
PS C:\Users\ipc\tmp\tonic> D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -n 100000 --connections=1 localhost:50051
Summary:
Count: 100000
Total: 3.89 s
Slowest: 13.00 ms
Fastest: 0 ns
Average: 1.87 ms
Requests/sec: 25674.03
Response time histogram:
0.000 [1457] |∎
1.300 [31865] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.600 [48007] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
3.900 [16078] |∎∎∎∎∎∎∎∎∎∎∎∎∎
5.200 [2526] |∎∎
6.501 [17] |
7.801 [0] |
9.101 [0] |
10.401 [0] |
11.701 [1] |
13.001 [49] |
Latency distribution:
10 % in 1.00 ms
25 % in 1.00 ms
50 % in 2.00 ms
75 % in 2.00 ms
90 % in 3.00 ms
95 % in 3.00 ms
99 % in 4.00 ms
H2-SERVER-CHANNELS:
PS C:\Users\ipc\tmp\tonic> D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -n 100000 --connections=1 localhost:50051
Summary:
Count: 100000
Total: 4.14 s
Slowest: 14.99 ms
Fastest: 0 ns
Average: 2.01 ms
Requests/sec: 24149.00
Response time histogram:
0.000 [2666] |∎∎∎
1.499 [31523] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.999 [41198] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
4.498 [23444] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
5.997 [906] |∎
7.497 [213] |
8.996 [0] |
10.495 [19] |
11.994 [11] |
13.494 [16] |
14.993 [4] |
Latency distribution:
10 % in 1.00 ms
25 % in 1.00 ms
50 % in 2.00 ms
75 % in 3.00 ms
90 % in 3.00 ms
95 % in 4.00 ms
99 % in 5.00 ms
Status code distribution:
[OK] 100000 responses
go-grpc:
PS C:\Users\ipc\tmp\tonic> D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -n 200000 --connections=1 localhost:50051
Summary:
Count: 200000
Total: 2.85 s
Slowest: 10.00 ms
Fastest: 0 ns
Average: 0.67 ms
Requests/sec: 70151.83
Response time histogram:
0.000 [77976] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
1.000 [57529] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.000 [60190] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
3.000 [4160] |∎∎
4.000 [94] |
5.000 [1] |
6.000 [0] |
7.000 [13] |
8.000 [34] |
9.001 [2] |
10.001 [1] |
Latency distribution:
0 % in 0 ns
0 % in 0 ns
50 % in 1.00 ms
75 % in 1.00 ms
90 % in 1.00 ms
95 % in 2.00 ms
99 % in 2.00 ms
Status code distribution:
[OK] 200000 responses
###############################################################################################################
with std Mutex
D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -z 5s --connections=1 localhost:50051
Summary:
Count: 122866
Total: 5.00 s
Slowest: 26.99 ms
Fastest: 0 ns
Average: 1.96 ms
Requests/sec: 24568.34
Response time histogram:
0.000 [305] |
2.699 [102752]|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
5.398 [19301] |∎∎∎∎∎∎∎∎
8.097 [369] |
10.796 [35] |
13.495 [13] |
16.194 [0] |
18.893 [0] |
21.591 [4] |
24.290 [30] |
26.989 [16] |
Latency distribution:
10 % in 1.00 ms
25 % in 2.00 ms
50 % in 2.00 ms
75 % in 2.00 ms
90 % in 3.00 ms
95 % in 3.00 ms
99 % in 4.00 ms
Status code distribution:
[Canceled] 1 responses
[Unavailable] 40 responses
[OK] 122825 responses
Error distribution:
[40] rpc error: code = Unavailable desc = transport is closing
[1] rpc error: code = Canceled desc = grpc: the client connection is closing
with parking_lot::Mutex
D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -z 5s --connections=1 localhost:50051
Summary:
Count: 161310
Total: 5.00 s
Slowest: 10.98 ms
Fastest: 0 ns
Average: 1.49 ms
Requests/sec: 32255.81
Response time histogram:
0.000 [2238] |∎
1.098 [83470] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.196 [71141] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
3.295 [3338] |∎∎
4.393 [631] |
5.491 [277] |
6.589 [84] |
7.688 [17] |
8.786 [16] |
9.884 [22] |
10.982 [28] |
Latency distribution:
10 % in 1.00 ms
25 % in 1.00 ms
50 % in 1.00 ms
75 % in 2.00 ms
90 % in 2.00 ms
95 % in 2.00 ms
99 % in 3.00 ms
Status code distribution:
[OK] 161262 responses
[Canceled] 2 responses
[Unavailable] 46 responses
Error distribution:
[2] rpc error: code = Canceled desc = grpc: the client connection is closing
[46] rpc error: code = Unavailable desc = transport is closing
go server
PS C:\Users\ipc\tmp\tonic> D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -z 5s --connections=1 localhost:50051
Summary:
Count: 266398
Total: 5.00 s
Slowest: 14.00 ms
Fastest: 0 ns
Average: 0.89 ms
Requests/sec: 53279.57
Response time histogram:
0.000 [61425] |∎∎∎∎∎∎∎∎∎∎∎∎∎
1.400 [183738]|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.800 [17030] |∎∎∎∎
4.200 [2425] |∎
5.600 [716] |
7.000 [837] |
8.400 [176] |
9.800 [41] |
11.200 [2] |
12.600 [1] |
14.000 [1] |
Latency distribution:
0 % in 0 ns
25 % in 1.00 ms
50 % in 1.00 ms
75 % in 1.00 ms
90 % in 1.00 ms
95 % in 2.00 ms
99 % in 3.00 ms
Status code distribution:
[OK] 266392 responses
[Unavailable] 6 responses
Error distribution:
[6] rpc error: code = Unavailable desc = transport is closing
##################################################################
single-threaded (rt-core) normal:
D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -z 5s --connections=1 localhost:50051
Summary:
Count: 134657
Total: 5.00 s
Slowest: 11.00 ms
Fastest: 0 ns
Average: 1.78 ms
Requests/sec: 26926.04
Response time histogram:
0.000 [716] |
1.100 [43157] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
2.200 [78201] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
3.300 [11183] |∎∎∎∎∎∎
4.400 [809] |
5.500 [333] |
6.600 [147] |
7.700 [16] |
8.800 [0] |
9.900 [4] |
11.000 [46] |
Latency distribution:
10 % in 1.00 ms
25 % in 1.00 ms
50 % in 2.00 ms
75 % in 2.00 ms
90 % in 2.00 ms
95 % in 3.00 ms
99 % in 4.00 ms
Status code distribution:
[OK] 134612 responses
[Canceled] 1 responses
[Unavailable] 44 responses
Error distribution:
[1] rpc error: code = Canceled desc = grpc: the client connection is closing
[44] rpc error: code = Unavailable desc = transport is closing
single threaded, parking_lot:
D:\apps\ghz.exe --insecure --proto .\examples\proto\helloworld\helloworld.proto --call helloworld.Greeter.SayHello -d '{\"name\":\"Joe\"}' -z 5s --connections=1 localhost:50051
Summary:
Count: 138596
Total: 5.00 s
Slowest: 19.00 ms
Fastest: 0 ns
Average: 1.75 ms
Requests/sec: 27719.20
Response time histogram:
0.000 [2240] |∎
1.900 [51210] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
3.800 [82802] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
5.699 [1952] |∎
7.599 [270] |
9.499 [20] |
11.399 [2] |
13.298 [0] |
15.198 [2] |
17.098 [39] |
18.998 [9] |
Latency distribution:
10 % in 1.00 ms
25 % in 1.00 ms
50 % in 2.00 ms
75 % in 2.00 ms
90 % in 3.00 ms
95 % in 3.00 ms
99 % in 4.00 ms
Status code distribution:
[OK] 138546 responses
[Unavailable] 50 responses
Error distribution:
[50] rpc error: code = Unavailable desc = transport is closing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment