-
Notifications
You must be signed in to change notification settings - Fork 292
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
Profiler API to record time spent in queues #4653
Conversation
9a08d83
to
52e9549
Compare
e030299
to
03bbf09
Compare
@@ -14,11 +14,11 @@ class ScopeAndContinuationLayoutTest extends DDSpecification { | |||
} | |||
|
|||
def "single continuation layout"() { | |||
expect: layoutAcceptable(ContinuableScopeManager.SingleContinuation, 32) | |||
expect: layoutAcceptable(ContinuableScopeManager.SingleContinuation, 40) |
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.
this could stay at 32 if, for example, the reference to AgentTrace
were removed. We can get away with just 32 bits for the timestamp because we know the queuing duration will be less than 25 days.
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.
How would you make Continuation
work without an AgentTrace
instance?
For the record, I replace it by a Context instance in my PoC.
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.
there's a reference chain from the span to the trace, so a couple of indirections can be traded for a reduction in space.
ed46ed5
to
612dd50
Compare
612dd50
to
42f1a80
Compare
@@ -14,11 +14,11 @@ class ScopeAndContinuationLayoutTest extends DDSpecification { | |||
} | |||
|
|||
def "single continuation layout"() { | |||
expect: layoutAcceptable(ContinuableScopeManager.SingleContinuation, 32) | |||
expect: layoutAcceptable(ContinuableScopeManager.SingleContinuation, 40) |
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.
How would you make Continuation
work without an AgentTrace
instance?
For the record, I replace it by a Context instance in my PoC.
AgentScope scope = scopeManager.continueSpan(this, spanUnderScope, source); | ||
scopeManager.recordContinuationLifeSpan(timestampMillis); |
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.
Any implicit reason to call ScopeManager.continueSpan()
before ScopeManager.recordContinuationLifeSpan()
?
(by implicit, I mean I could not find one but I expect to missed it 😓 )
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.
yes, to ensure the scope is on the stack (which has the side effect of activating it) - this probably requires a comment, so thanks for picking up on it.
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.
as discussed offline, I think we can wait for changes in this area and keep this PR scoped to the profiler changes
49ab276
to
f00787c
Compare
f00787c
to
436956f
Compare
What Does This Do
Motivation
Additional Notes