didi / rdebug Goto Github PK
View Code? Open in Web Editor NEWRdebug — Real Debugger
License: Apache License 2.0
Rdebug — Real Debugger
License: Apache License 2.0
LD_PRELOAD="/usr/lib64/koala-libc.so /usr/lib64/libcurl.so.4" LC_CTYPE="C" KOALA_SO=/usr/lib64/koala-recorder.so KOALA_RECORD_TO_DIR=/tmp/rdebug/record/ /opt/remi/php72/root/usr/sbin/php-fpm
ERROR: ld.so: object '/usr/lib64/koala-libc.so' from LD_PRELOAD cannot be preloaded: ignored.
我厂有对mongoDB进行数据的增删改查,请问下这个有支持嘛?这种格式的
$service = "mongodb://{$user}:{$pwd}@{$host}";
目前的连接mongoDB的回放是回放不成功的
请问你们在使用哪个Docker版本
Can you make a Dockerfile and push the docker image to hub.docker.com?
So I can quickly start testing , no need spend the time for Rdebug installation.
支持java吗
下游kafka的请求可以回放到吗
你好,大神,请问一下这个工具的录制对象是什么?是经过某个接口、端口的流量么?为什么在指令里体现不出录制对象?架构图没有看懂……
Linux 下使用 midi run 命令加多个 -f 参数回放多个文件时会卡住,而逐个回放则没有问题
CentOS 7.2 x64
在同一环境下进行录制、回放
$ cd $my_project/public/
$ ~/rdebug/output/bin/midi.phar run -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -f 1 -D
Finally will replay 13 sessions.
Progressing: 1/13 [>>>-------------------------] 7% 8.0 MiB
Diff Result: Response Body No Diff!
...
Progressing: 12/13 [>>>>>>>>>>>>>>>>>>>>>>>>>>--] 92% 10.0 MiB # 每次都卡在第 12 个文件
TCP localhost:54747->localhost:5514 (ESTABLISHED)
TCP *:5514 (LISTEN)
TCP localhost:5516 (LISTEN)
TCP localhost:5515 (LISTEN)
TCP localhost:5514->localhost:54747 (ESTABLISHED)
TCP localhost:36718->localhost:5515 (ESTABLISHED)
TCP localhost:5515->localhost:36718 (ESTABLISHED)
似乎 localhost:54747 <----> localhost:5514 之间的交互出现了问题,阻塞后续请求
源码的默认处理是按照 json utf-8 实现的,但实际验证 xml 也可以进行回放
发送响应结果较小的请求,生成录制文件大小 20k,重复上述步骤,每次回放 3000 个文件,尝试多次偶现卡在第 300, 500 个文件的情况
修改 Midi/Config.yml 中 memory_limit 为 100G,重新编译后重复上述步骤,未能解决问题
修改 Midi/Config.yml 中 gc-global-status-timeout = 10s,重新编译后重复上述步骤,未能解决问题
修改 Midi/Config.yml 中 inbound-read-timeout = 5s,进程不再卡住,超时后提示 Seem Koala response empty, retry...
...
Progressing: 12/13 [>>>>>>>>>>>>>>>>>>>>>>>>>>--] 92% 10.0 MiB
Seems Koala response empty, retry ...
Seems Koala response empty, retry ...
Koala response empty: OK
Progressing: 13/13 [>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 100% 10.0 MiB
Seems Koala response empty, retry ...
Seems Koala response empty, retry ...
Koala response empty: OK
Summary: Replayed 13 Sessions No DIFF. Spent 186 s.
但未能解决问题,第 12, 13 个请求返回为空
更换另一台 CentOS 7.2 机器,存在同样问题
例如一次添加操作生成一id,但是重放的时候生成的可能是另一个id,会造成接下去的重放失败?
考不考虑出一个指定倍速回复流量的功能?比如说,录制qps是20,指定20倍就是400qps。
请问这个框架可以作为独立的测试框架来使用吗? 与待测网元完全解耦, 不关心语言和实现
怎样去回放经常发生变动的API接口?
长久以来,我对这类的组件也和你们didi一样有同样的想法,但苦于下面两个问题无法实现,从而一直搁置。我看你们的文档上,并没有阐述对这个问题的解决,不知道是不是?
1、针对于 /books POST (new Book) 和 接踵而来的 /books/:bookId PATCH 这样的接口,对前端是有感知的,但是记录下来,对于后端确实无感知的。
2、API接口发生微调的接口,即只要改变一点点数据结构,即之前记录全部无效。
How to play back the API interface that changes frequently?
For a long time, I have the same idea for this type of component as you did with didi, but I have been stuck with the following two problems. I see your document, and did not explain the solution to this problem, I don't know if it is?
/go/src/github.com/didi/rdebug/koala # ./build.sh recorder
+++ dirname ./build.sh
++ cd ../.
++ pwd -P
+ RDEBUG=/go/src/github.com/didi/rdebug
+ case $1 in
+ export GOPATH=/tmp/build-golang
+ GOPATH=/tmp/build-golang
+ export 'CGO_CFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CPPFLAGS=-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ CGO_CPPFLAGS='-DKOALA_LIBC_NETWORK_HOOK -DKOALA_LIBC_FILE_HOOK'
+ export 'CGO_CXXFLAGS=-std=c++11 -Wno-ignored-attributes'
+ CGO_CXXFLAGS='-std=c++11 -Wno-ignored-attributes'
+ exec go build -tags=koala_recorder -buildmode=c-shared -o /go/src/github.com/didi/rdebug/output/libs/koala-recorder.so github.com/didi/rdebug/koala/cmd/recorder
# github.com/didi/rdebug/koala/gateway/gw4libc
In file included from file_hook.cpp:11:
file_hook.cpp:73:11: error: redefinition of 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)'
INTERPOSE(fopen)(const char *filename, const char *opentype) {
^~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:19:11: note: 'template<class ... Args> decltype (fopen(real::fopen::args ...)) real::fopen(Args ...)' previously declared here
INTERPOSE(fopen64)(const char *filename, const char *opentype) {
^~~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:73:11: error: redefinition of 'FILE* fopen(const char*, const char*)'
INTERPOSE(fopen)(const char *filename, const char *opentype) {
^~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:19:11: note: 'FILE* fopen(const char*, const char*)' previously defined here
INTERPOSE(fopen64)(const char *filename, const char *opentype) {
^~~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:101:11: error: redefinition of 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)'
INTERPOSE(open)(const char *filename, int flags, ...) {
^~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:47:11: note: 'template<class ... Args> decltype (open(real::open::args ...)) real::open(Args ...)' previously declared here
INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
^~~~~~
interpose.h:38:10: note: in definition of macro 'INTERPOSE'
auto NAME(Args... args) -> decltype(::NAME(args...)) { \
^~~~
file_hook.cpp:101:11: error: redefinition of 'int open(const char*, int, ...)'
INTERPOSE(open)(const char *filename, int flags, ...) {
^~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
file_hook.cpp:47:11: note: 'int open(const char*, int, ...)' previously defined here
INTERPOSE(open64)(const char *filename, int flags, mode_t mode) {
^~~~~~
interpose.h:49:31: note: in definition of macro 'INTERPOSE'
extern "C" decltype(::NAME) NAME __attribute__((weak, alias("__interpose_" #NAME))); \
^~~~
如题
Hi guys, this is a really impressive tool, and I would like to know how much disk space it could take every day to record a production service?
求golang的demo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.