Comments (1)
1.链路追踪
有的。用法可以参考tutorial-01-srpc_pb_server.cc
SRPCServer server;
RPCSpanDefault<RPCTYPESRPC> span_module; // RPCTYPESRPC作为module的模版,配合server使用
server.add_module(&span_module);
tutorial里由于已经有了,你直接跑起来的话,server会得到:
[SPAN_LOG] trace_id: 1317158132757037056 span_id: 1 service: Example method: Echo start: 1627638902336 end_time: 1627638902336 cost: 0 remote_ip: 127.0.0.1 state: 1 error: 0
而client会得到:
[SPAN_LOG] trace_id: 1317158132757037056 span_id: 0 service: Example method: Echo start: 1627638902336 end_time: 1627638902337 cost: 1 remote_ip: 127.0.0.1 state: 1 error: 0
[SPAN_LOG] trace_id: 1317158132757037058 span_id: 1 service: Example method: Echo start: 1627638902336 end_time: 1627638902337 cost: 1 remote_ip: 127.0.0.1 state: 1 error: 0
这是基于RPCModule实现的一种module,用于请求在框架层帮你做的事情。目前span的功能具体实现有两个:RPCSpanDefault
和RPCSpanRedis
,分别是打log和入redis库(都是异步做的,不会堵住当前请求),这个接口是开放的,如果你有想要对接的可视化工具,可以模仿代码进行派生实现。
另外支持不同采样需求^_^~~~ 比如,刚才的trace_id: 1317158132757037056在server的log里有、而另一条没有,是因为server对于span的采集默认控制了1s只打一条log。所以你可以构造一个RPCSpanFilterPolicy
传给RPCSpan的module指定需要的采样。
2.性能测试
不同的协议是用的不同的测试工具,这个在benchmark里有写。比如,测brpc框架,咱们肯定是用brpc-client,然后对srpc框架的brpc协议和brpc框架的brpc协议进行测试对比。thrift也是一样的。画图用的python带着gnu plot画的。
from srpc.
Related Issues (20)
- crt detected that the application wrote to memory after end of heap buffer HOT 4
- 🎉 srpc tools: simple generator for building Workflow and SRPC projects
- cross compile problem HOT 12
- compile problem HOT 14
- srpc_generator.exe无法使用 HOT 3
- does one service support multi function HOT 7
- Android compile problem HOT 20
- MacOS下链接找不到protobuf HOT 9
- srpc搭建http服务时, 回包如何通过JsonPrintOptions设置打印格式 HOT 4
- 要求CMake找到一个由“Snappy”提供的包配置文件,但是 CMake没有找到。 HOT 6
- docs/wiki.md第二章图片有误 HOT 1
- Srpc无法正确生成官方hbase.thrift的srpc客户端 HOT 24
- Support in API testing tool linuxsuren/api-testing HOT 7
- srpc和workflow配合使用问题 HOT 19
- 在SRPCHttpServer上启用trace上报opentelemtry功能异常 HOT 6
- 关于 RPCBuffer 中 read_back 问题 HOT 3
- 关于 RPCBuffer::cut 和 BRPC 中的 attachment 使用的问题 HOT 2
- 是否计划支持linux io_uring? HOT 3
- SRPC性能测试问题 HOT 26
- client.Echo start multi thread,how can I start only one thread? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srpc.