Skip to content

Profiler API to record time spent in queues#4653

Merged
richardstartin merged 1 commit into
masterfrom
rgs/queueing-time
Feb 7, 2023
Merged

Profiler API to record time spent in queues#4653
richardstartin merged 1 commit into
masterfrom
rgs/queueing-time

Conversation

@richardstartin

Copy link
Copy Markdown
Contributor

What Does This Do

Motivation

Additional Notes

@richardstartin richardstartin changed the title use continutations to record queuing time between scheduling and execution use continuations to record queuing time between scheduling and execution Feb 3, 2023
@richardstartin
richardstartin force-pushed the rgs/queueing-time branch 3 times, most recently from e030299 to 03bbf09 Compare February 3, 2023 19:44

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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.

@richardstartin richardstartin added the comp: profiling Profiling label Feb 3, 2023
@richardstartin
richardstartin force-pushed the rgs/queueing-time branch 13 times, most recently from ed46ed5 to 612dd50 Compare February 6, 2023 19:09
@richardstartin
richardstartin marked this pull request as ready for review February 7, 2023 08:56
@richardstartin
richardstartin requested review from a team as code owners February 7, 2023 08:56

Copy link
Copy Markdown
Contributor

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.

Comment on lines 686 to 687

@PerfectSlayer PerfectSlayer Feb 7, 2023

Copy link
Copy Markdown
Contributor

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 😓 )

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

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

@richardstartin richardstartin changed the title use continuations to record queuing time between scheduling and execution Profiler API to record time spent in queues Feb 7, 2023
@richardstartin
richardstartin merged commit 571e51e into master Feb 7, 2023
@richardstartin
richardstartin deleted the rgs/queueing-time branch February 7, 2023 16:48
@github-actions github-actions Bot added this to the 1.7.0 milestone Feb 7, 2023
@richardstartin richardstartin added the tag: no release notes Changes to exclude from release notes label Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: profiling Profiling tag: no release notes Changes to exclude from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants