-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add notice-log for every request #226
Conversation
[Wed May 28 15:06:12 2014] nc_request.c:59 req 3 done on c 11 req_time: 0.353 type: SET narg: 3 mlen: 35 key0: kkk-3, done: 1, error:0
this patch will miss some request in pipeline, the newest code can be found here(and we use ms in log): @manjuraj : it's hard to maintain 2+ branches, if this can be merged, I will create a new pull request for the newest code. current notice-log example:
|
* this is auto generate by scripts/gen_msg_type_str.py | ||
*/ | ||
inline char * | ||
msg_type_str(msg_type_t type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a py script. You can generate the strings using macro magic called strigificaion :) This way your code never gets outdate
See this for reference --
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
macro create clean code but break cscope/ctags :(
clean code is more important, I will have a try.
Looks great. Added few comments on the commit Instead of the format:
can we do this:
The reason I stay away from ":" is because throughout the nutcracker code base ":" is used the separate the logline from the error message like this - https://github.com/twitter/twemproxy/blob/master/src%2Fnc_client.c#L184 |
1. use MSG_TYPE_CODEC instead py script, 2. del colon in notice log
1. add peer ip:port on notice log 2. fix missing of notice_log in pipeline
add notice-log for every request
Great job @idning |
we need a NOTICE log for every request, fields::
so we can stat req/s, average srv time, key frequency with awk/grep, this is very useful for Tracing.
here is the format:
maybe add: