https://github.com/tgrpc/tgrpc
invoke grpc in terminal
https://github.com/tgrpc/tgrpc
grpc-go grpc-testing grpc-toolkit
Last synced: 6 months ago
JSON representation
invoke grpc in terminal
- Host: GitHub
- URL: https://github.com/tgrpc/tgrpc
- Owner: tgrpc
- Created: 2018-04-12T06:11:45.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-18T09:39:07.000Z (over 6 years ago)
- Last Synced: 2024-06-20T12:43:40.675Z (about 2 years ago)
- Topics: grpc-go, grpc-testing, grpc-toolkit
- Language: Go
- Homepage:
- Size: 78.1 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tgrpc
tg: tgrpc in termial
============
为了方便测试,可开启grpc服务代理,参考[github.com/tgrpc/ngrpc](https://github.com/tgrpc/ngrpc)。
使用方法,请看[tgrpc/doc](https://github.com/tgrpc/doc)
## usage
```
tg -c tgrpc.toml
```
```
DEBU[0000] dial tcp:localhost:2080 ...
DEBU[0000] use exist desc FileDescriptorSet=.helloworld.Greeter.pbin
ERRO[0000] time cost: 4.05723ms more than 2 ms;
helloworld.Greeter/SayHello ==> {
"message": "Hello tgrpc-tg1"
}
```
```
tg -s
```
```
DEBU[0000] dial tcp:localhost:2080 ...
DEBU[0000] use exist desc FileDescriptorSet=.helloworld.Greeter.pbin
ERRO[0000] time cost: 3.41066ms more than 2 ms;
DEBU[0000] dial tcp:localhost:2080 ...
DEBU[0000] use exist desc FileDescriptorSet=.helloworld.LangService.pbin
DEBU[0000] time cost: 1.007471ms / 2 ms;
DEBU[0000] time cost: 1.008415ms / 2 ms;
WARN[0000] time cost: 1.849676ms nearby 2 ms;
WARN[0000] time cost: 1.921683ms nearby 2 ms;
WARN[0000] time cost: 1.967108ms nearby 2 ms;
WARN[0001] time cost: 1.545166ms nearby 2 ms;
WARN[0001] time cost: 1.77252ms nearby 2 ms;
WARN[0001] time cost: 1.63466ms nearby 2 ms;
helloworld.Greeter/SayHello size: 3
avg: 1.863101 ms
max: 1.967108 ms
min: 1.772520 ms
```
## todo
1. 调用链状态显示
## roadmap
1. 验证接口返回结果
2. 验证接口响应时间
3. 方法调用闭环,支持利用上次返回结果构建参数
4. 接口响应时间统计:最大、最小、平均耗时
## origin
部分代码参考[github.com/uber/prototool](https://github.com/uber/prototool)