Skip to content

Add profiling manager snippets for how-to-capture DAC docs #564

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

edgararriagag
Copy link

Adding some snippets required for the upcoming Profiling Manager sections for DAC documents

Copy link

snippet-bot bot commented Jul 11, 2025

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link

@AliceYuan AliceYuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, added some nits

// Computations you want to profile
}

void sampleRecordSystemTrace() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just start the code snippet right before this function?

super.onCreate(savedInstanceState)
sampleRecordSystemTrace()
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same q around just showing the function

SystemTraceRequestBuilder requestBuilder = new SystemTraceRequestBuilder();
requestBuilder.setCancellationSignal(stopSignal);
requestBuilder.setTag("FOO");
requestBuilder.setDurationMs(60000);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we pull this into duration const

requestBuilder.setCancellationSignal(stopSignal)
requestBuilder.setTag("FOO") // Caller supplied tag for identification
requestBuilder.setDurationMs(60000)
requestBuilder.setBufferFillPolicy(BufferFillPolicy.RING_BUFFER)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we share what the other options are in a comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants