Skip to content
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 a skeleton "http_profile" package #1036

Merged
merged 6 commits into from
Nov 2, 2023

Conversation

brianquinlan
Copy link
Collaborator

@brianquinlan brianquinlan commented Oct 30, 2023

  • Creates a new experimental package:http_profile (final name TBD)
  • Will eventually implement the non-SDK HTTP Client Profiling design (TL;DR will allow non-SDK HTTP clients to record profiling information in a HttpClientRequestProfile instance and have that information displayed in the DevTools Network tab)

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

@github-actions github-actions bot added the infra label Oct 30, 2023
pkgs/http_profile/pubspec.yaml Outdated Show resolved Hide resolved
pkgs/http_profile/lib/http_profile.dart Outdated Show resolved Hide resolved

/// Records information about an HTTP request.
final class HttpClientRequestProfile {
/// Determines whether HTTP profiling is enabled or not.
Copy link
Member

Choose a reason for hiding this comment

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

[nit] Avoid phrases for getters. For booleans we often start the doc with "Whether".

Suggested change
/// Determines whether HTTP profiling is enabled or not.
/// Whether HTTP profiling is enabled for the current zone's [HttpClient].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if we want to pull the zone concept in here - I think that this is actually per isolate. But I stared the sentence with "Whether".

static set profilingEnabled(bool enabled) =>
HttpClient.enableTimelineLogging = enabled;

String? requestMethod;
Copy link
Member

Choose a reason for hiding this comment

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

Can you expand the commit message (I usually edit the first PR comment then copy it to the message when I squash/merge) to include more details about how this class will be used by the SDK/DevTools?

What code will fill these fields in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Update the commit message.

@brianquinlan brianquinlan merged commit 04777ac into dart-lang:master Nov 2, 2023
13 checks passed
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.

3 participants