Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Issue 3169047: Add in some infrastructure to make tracing of logical requests broken over async callbacks easier. (Closed)

Created:
10 years, 3 months ago by awong
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Sergey Ulanov, dmac, awong, garykac, Alpha Left Google
Base URL:
git://codf21.jail.google.com/chromium.git
Visibility:
Public.

Description

Add in some infrastructure to make tracing of logical requests broken over async callbacks easier. Create a concept of a TraceContext that holds a current Tracer which can be used to create a timeseries sequence of events. This implementation extends the functionality of RunnableMethod and NewRunnableMethod() to create a parallel TracedMethod, and NewTracedMethod(). These new Traced methods methods and types know how to propogate the current TraceContext to create a logical sequence of annotations through the servicing of one logical action. Currently, the code is controlled via define macro which changes NewTracedMethod back into NewRunnableMethod if the hook is disabled. BUG=52883 TEST=compiles, and client can connect to host. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=57992

Patch Set 1 #

Total comments: 30

Patch Set 2 : Refactored. #

Patch Set 3 : Tracer updated! #

Patch Set 4 : Address comments from Andrew. #

Patch Set 5 : remove stale todo. #

Total comments: 5

Patch Set 6 : Fix the type. #

Patch Set 7 : More comments. #

Patch Set 8 : sent #

Unified diffs Side-by-side diffs Delta from patch set Stats (+512 lines, -0 lines) Patch
M remoting/base/protocol/chromotocol.gyp View 3 4 5 6 7 1 chunk +63 lines, -0 lines 0 comments Download
A remoting/base/protocol/trace.proto View 3 1 chunk +37 lines, -0 lines 0 comments Download
A remoting/base/tracer.h View 1 2 3 4 5 6 1 chunk +265 lines, -0 lines 0 comments Download
A remoting/base/tracer.cc View 1 2 3 4 5 6 1 chunk +144 lines, -0 lines 0 comments Download
M remoting/remoting.gyp View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
awong
You guys are going to kill me... I still have to clean this up (eg., ...
10 years, 3 months ago (2010-08-26 01:40:57 UTC) #1
scherkus (not reviewing)
http://codereview.chromium.org/3169047/diff/1/2 File remoting/base/protocol/chromotocol.proto (right): http://codereview.chromium.org/3169047/diff/1/2#newcode13 remoting/base/protocol/chromotocol.proto:13: // TODO(ajwong): Move the trace protocol messages out of ...
10 years, 3 months ago (2010-08-26 19:04:13 UTC) #2
awong
early responses. Still fixing code. http://codereview.chromium.org/3169047/diff/1/2 File remoting/base/protocol/chromotocol.proto (right): http://codereview.chromium.org/3169047/diff/1/2#newcode13 remoting/base/protocol/chromotocol.proto:13: // TODO(ajwong): Move the ...
10 years, 3 months ago (2010-08-26 19:19:52 UTC) #3
scherkus (not reviewing)
http://codereview.chromium.org/3169047/diff/1/4 File remoting/base/tracer.h (right): http://codereview.chromium.org/3169047/diff/1/4#newcode131 remoting/base/tracer.h:131: tracer_(TraceContext::tracer()) { On 2010/08/26 19:19:52, awong wrote: > On ...
10 years, 3 months ago (2010-08-26 19:21:58 UTC) #4
awong
Updated this. I'm thinking of checking it in for now. Will need to reevaluate the ...
10 years, 3 months ago (2010-08-31 02:32:08 UTC) #5
scherkus (not reviewing)
probably good for now! LGTM w/ nits http://codereview.chromium.org/3169047/diff/20001/21003 File remoting/base/tracer.cc (right): http://codereview.chromium.org/3169047/diff/20001/21003#newcode111 remoting/base/tracer.cc:111: double random_variable ...
10 years, 3 months ago (2010-08-31 03:16:26 UTC) #6
awong
10 years, 3 months ago (2010-08-31 04:27:14 UTC) #7
Fixed.

http://codereview.chromium.org/3169047/diff/20001/21003
File remoting/base/tracer.cc (right):

http://codereview.chromium.org/3169047/diff/20001/21003#newcode111
remoting/base/tracer.cc:111: double random_variable =
On 2010/08/31 03:16:27, scherkus wrote:
> I think you want RandDouble() from src/base/rand_util.h


Sure...that looks good.

http://codereview.chromium.org/3169047/diff/20001/21004
File remoting/base/tracer.h (right):

http://codereview.chromium.org/3169047/diff/20001/21004#newcode68
remoting/base/tracer.h:68: Tracer(const std::string& name, double
sample_percent);
On 2010/08/31 03:16:27, scherkus wrote:
> what's sample percent used for?
> 
> I could guess, but it seems that most usage is set to 1.0 (which I guess is
> 100%?) and there are no docs about how to use it

You don't want 100% always. That's going overwhelm the system possibly.  I've
actually been happy with about 1% most of the time.  I'll add some docs.

Powered by Google App Engine
This is Rietveld 408576698