Commit Graph

9 Commits

Author SHA1 Message Date
Ben Konyi c4bfca9b6a [ dart:io / package:vm_service ] Add HTTP request profiling service
extensions

This change adds HTTP request profiling support to the dart:io service
extensions and removes HTTP request/response body logging to the
timeline due to memory constraints.

Fixes https://github.com/dart-lang/sdk/issues/44950

TEST=pkg/vm_service/test/get_http_profile_test.dart

Change-Id: I85642296c3d6595197f3365022477c7685c452bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189881
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-03-24 23:01:03 +00:00
Kenzie Schmoll 76118806bd [dart:io / Service] Rename State class to _State to avoid class name conflicts with Flutter
Change-Id: If252628b39d4f38f5d67b76f8fdd7195e9975b79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169245
Reviewed-by: Ben Konyi <bkonyi@google.com>
2020-10-27 23:38:53 +00:00
Ben Konyi b9f83d1988 [ dart:io / Service ] Added socketProfilingEnable RPC to dart:io service
extensions

This is a replacement for startSocketProfiling and pauseSocketProfiling
which are now deprecated in favor of this single setter/getter RPC.

Also added a SocketProfilingStateChange event that is sent on the
Extension stream when socket profiling is enabled or disabled.

Fixes https://github.com/dart-lang/sdk/issues/43923

Change-Id: Ie3d7bb8cddaa935de3725ee95a39a17d0588e66f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169140
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2020-10-26 23:15:57 +00:00
Ben Konyi 9c1adbd8c5 [ dart:io / package:vm_service ] Change parameter name for httpEnableTimelineLogging enable -> enabled
This is a backward compatible change that will continue to accept the
old parameter name.

Fixes https://github.com/dart-lang/sdk/issues/43628

Change-Id: I4e7a9d8d14921784e9d1c8693ae2252cf5f023e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165623
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-10-01 17:17:58 +00:00
Ben Konyi e85e5b6264 [ dart:io / package:vm_service ] Add httpEnableTimelineLogging extension and service events
- Added httpEnableTimelineLogging to the dart:io service extensions
- Deprecated setHttpEnableTimelineLogging and getHttpEnableTimelineLogging
- Send service event when HTTP timeline logging state has changed

Change-Id: I56df249fcfb11d7041a40a7749d47f6ef8f97c10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163724
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-09-22 16:06:23 +00:00
Ben Konyi a44409615f [ Service / dart:io ] Rework previously unused dart:io service extensions
This CL is mostly modernizing existing Process and File profiling code
that was never made public. Updated the service extension responses to
be more consistent with the rest of the service protocol.

Related to https://github.com/dart-lang/sdk/issues/41455.

Change-Id: I116b3cd1424980e4ec8133672901990776c1d9c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157160
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-09-18 20:15:56 +00:00
Ben Konyi 93c9ebabd6 [ VM / dart:io / Service ] Add service extension RPCs to dart:io to allow for HttpClient.enableTimelineLogging to be set remotely.
It isn't possible to do this with evaluate since we are unable to access
classes from private libraries exposed through dart:io like dart:_http.

Change-Id: I3d4168d919dbcf5008da60b14165fd9b89f22cad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129322
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-12-26 23:23:34 +00:00
Ben Konyi 017ea8b54a [ VM / dart:io ] Added lastReadTime, lastWriteTime to socket profiling
Change-Id: I8dc7c271b44bdecf5fcc081c1324ce809ca9c140
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129562
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-12-26 16:22:34 +00:00
Zichang Guo bf69257c5f [dart:io] socket profiler in dart:io
Add socket profiler functionality through service extension.

Change-Id: I717b72fbb1c53503dfb8fa08789417c18300565d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/124582
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-12-02 19:11:18 +00:00