Commit Graph

67 Commits

Author SHA1 Message Date
Konstantin Shcheglov 6062fe8ae1 Fine. Collect statistics for RequirementFailure kinds.
Requires https://github.com/dart-lang/tools/pull/2250

Change-Id: I477b85d19edec7abdee6f9375a77a4e16dfab9ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/463163
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-11-24 15:59:20 -08:00
Sam Rawlins 68d44b88c1 DAS: Make many protocol constants lowerCamelCase
Change-Id: Ibe3ae38d2afe00a125ed43034625924d4e989755
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461241
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-11-12 09:14:29 -08:00
Keerti Parthasarathy 68b5f64ed5 [analytics] Split the other workspace types into Blaze, Gn and other
Change-Id: Ibf46f2dec665e2cbee88ee961d6a4b46b6617c6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/459541
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-11-04 12:49:12 -08:00
Konstantin Shcheglov 3f95bfde1a Fine. Fix for withFineDependencies value in analytics in long sessions.
Change-Id: I7bde7585503197f4dc490b09cea9a96dac565597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/458624
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-30 14:45:11 -07:00
Konstantin Shcheglov a2d2268d06 Fine. Add 'produceErrors' statistics to 'analysis_statistics'.
Change-Id: I07c80b4fc543ca36941b99f0f5e4dbd8b2030a9d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-30 07:30:36 -07:00
Keerti Parthasarathy 0cf974819f Send the workspace stats to analytics
Change-Id: I99cd3e9c2d45c9748b31d226ba565ead6f45bf42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457780
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-27 10:46:17 -07:00
Keerti Parthasarathy a46b4bb4c6 Collect analytics on type of workpace and number of packages for contexts.
Change-Id: I2274536383f92f21912bd39dc5a6796dd2177fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456800
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-10-23 12:21:55 -07:00
Konstantin Shcheglov 661d4a6aed Fine. Send analysis_statistics events to analytics.
Change-Id: Idd2350803bf20b2cc59cfe98a8053d235d1ae108
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/453104
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2025-10-05 09:34:13 -07:00
Sam Rawlins 33f664940a Bump DAS to use Dart SDK 3.9.0
Change-Id: I04bc285d822a657adb5573c6de3eb38655ab0fcd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448232
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-09-03 12:56:29 -07:00
Sam Rawlins 649944c76d DAS plugins: Rename PluginInfo to PluginIsolate; move to separate library
Work towards https://github.com/dart-lang/sdk/issues/61386

A few distinct changes:

* Rename PluginInfo to PluginIsolate
* Move PluginInfo and PluginSession to a new library,
  plugin_isolate.dart. PluginSession is _essentially_ a private class
  to PluginIsolate, so it's good to co-locate them.
* Move PluginInfo tests and PluginSession tests to a new library.
* Extract out shared parent class for PluginManager tests,
  PluginIsolate tests, and PluginSession tests.

Change-Id: Ib0c638b8797f51c57c07e277acdaea6d8202f957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-08-26 19:02:42 -07:00
Sam Rawlins 423deed157 DAS: Tidy up the plugin analytics data
Change-Id: Id7e3b158f148525c69cc90c1f3c8a98ec53fd336
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446280
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-08-21 11:11:13 -07:00
Brian Wilkerson b402fac6fa Adds library cycle data to the analytics.
The two pieces of information we're tracking are
- the number of libraries in each library cycle
- the number of lines of code in each library cycle

The data is reported in terms of percentage.

This doesn't give us any way to correlate the two values. Knowing that
there is a library cycle with M libraries and a cycle with N lines of
code, doesn't tell us whether it's the same library cycle in both cases.
Still, I think it will help us understand the nature of the code that
we need to be able to analyze quickly.

Change-Id: I36a8bf11c4c6fdced6c524225be7a633062351ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437126
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2025-06-26 14:54:52 -07:00
Brian Wilkerson 8f1a2b39ea Bump tools to 7bf22c951019f860aa52a8b7dc97fba5880aa9ba
Changes:
```
> git log --format="%C(auto) %h %s" 1e110fc..7bf22c9
 https://dart.googlesource.com/tools.git/+/7bf22c95 [unified_analytics]Add library cycle info to analysis server data (2117)

```

Diff: https://dart.googlesource.com/tools.git/+/1e110fcf8da4fbd423e22ae7d14f04c908d7c139..7bf22c951019f860aa52a8b7dc97fba5880aa9ba/
Change-Id: I0cd6893dc35fd4dc938070afb4ec1c2f45054dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436943
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2025-06-25 15:08:46 -07:00
Parker Lougheed 04b178d8dc [analysis_server] Remove a few instances of dynamic
Change-Id: If117a852bf052f9e3deb879cdd92c48b68241b26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423161
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-04-28 15:29:21 -07:00
Jens Johansen a9d2363f08 [analyzer] Don't collect analytics if not using it; cache getTopLevelDeclarations results in DartFixContext
Sometimes - on responding to `edit.getFixes` requests, the method
`getTopLevelDeclarations` is called several times with the same
parameter and caching has then sometimes sped things up.

I then also noticed that it caused `reportAnalysisAnalytics` to be
called many times (e.g. 73 times for one `edit.getFixes` request)
each time spending time collecting data which - on passing to
`analyticsManager.analysisComplete` - was just thrown away because it
only saves the first one.

Combined these changes have been observed to reduce the response time
on `edit.getFixes` by up (down?) to ~20% (e.g. from 5 seconds
to 1 second).

In response to http://b/407797012 where more data is also available.

Unfortunately I haven't been able to reproduce this is a benchmark
(yet anyway). I don't know if it needs slower slower reads, an extreme
amount of files, several contexts or something else entirely.

Change-Id: Id214b0e1b7d8bbef7f6d956408f17fab45618b78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420323
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-04-07 05:36:53 -07:00
pq 6acab30e25 [analytics] validate lintUsage reporting for multiple options files
Change-Id: I6d6bbcc14d80fc670e134a8fa84f0ef42d17b3f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418440
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-28 10:16:20 -07:00
pq cbe2793d3a [analytics] stop collecting context creation style data
Bug: https://github.com/dart-lang/sdk/issues/60411
Change-Id: I987557393cfc1b92b5d00467f5aedc9674eba07c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417946
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2025-03-27 10:37:15 -07:00
Mohamed Abdelaal 9b7bb9df90 Fix "the the" typo
Closes https://github.com/dart-lang/sdk/pull/59926

GitOrigin-RevId: cb37bca473b0c177b876a0f4e75858cd1862e699
Change-Id: I6827241b22e99db455945afcdfbaee0450999ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404923
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2025-01-21 14:08:20 -08:00
Sam Rawlins fbf331e0dd DAS: reformat source code with tall-style
Change-Id: I42b4a44fd6a2197e499e8623274b3cd1a4b5556f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394003
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-11-06 23:04:00 +00:00
Konstantin Shcheglov 5c07c89a35 Enable 'unnecessary_final' in analysis_server/.
Change-Id: I71ee934b915d4aff924cf5925f87bcc9adc6c015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-04-16 20:04:15 +00:00
pq daf06f3fe4 spelling fixes
Change-Id: I719e6daf9b465e362ffcf3ab29877667dd9e3963
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346904
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-17 21:04:48 +00:00
pq 440ea59ee0 enable flutter_style_todos in server
Change-Id: I4921d538e1498e66c8cab2d84dfcad21d1a7b555
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335952
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-11-14 21:08:12 +00:00
Polina Cherkasova cd96507b72 Switch from leak_tracker/leak_tracker to leak_tracker/memory_usage.
It is relanding of https://dart-review.googlesource.com/c/sdk/+/334143

Contributes to https://github.com/flutter/flutter/issues/135856

We want Flutter to take dependency on leak_tracker. It will be easier to manage in G3 if Flutter and Dart SDK depend on different packages. So, separated memory_usage and switching analyzer to it.

Change-Id: Ic85172bfe28cf070e01f5ff298ee975b25ae6f68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335061
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2023-11-08 20:57:51 +00:00
pq 354f91a25b add an allAnalysisOptions getter to driver based contexts
Change-Id: I0dc6a2508ba89afc86a663cbd0557d168a0c7cc1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334643
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-11-07 20:57:29 +00:00
Oleh Prypin 72195c41bb Revert "Switch from leak_tracker/leak_tracker to leak_tracker/memory_usage."
This reverts commit 64adde8968.

Reason for revert: package is not ready for use in g3

Original change's description:
> Switch from leak_tracker/leak_tracker to leak_tracker/memory_usage.
>
> Contributes to https://github.com/flutter/flutter/issues/135856
>
> We want Flutter to take dependency on leak_tracker. It will be easier to manage in G3 if Flutter and Dart SDK depend on different packages. So, separated memory_usage and switching analyzer to it.
>
> Change-Id: Ib1a7aae4af8c5dfb84e9f7252319862b0c93a8b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334143
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Polina Cherkasova <polinach@google.com>

Bug: b/309525596
Change-Id: I02cb1097839e37910e40f38f856230a82abbfe61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334462
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-07 11:07:19 +00:00
Polina Cherkasova 64adde8968 Switch from leak_tracker/leak_tracker to leak_tracker/memory_usage.
Contributes to https://github.com/flutter/flutter/issues/135856

We want Flutter to take dependency on leak_tracker. It will be easier to manage in G3 if Flutter and Dart SDK depend on different packages. So, separated memory_usage and switching analyzer to it.

Change-Id: Ib1a7aae4af8c5dfb84e9f7252319862b0c93a8b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334143
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2023-11-06 23:06:11 +00:00
Devon Carew 540b3a899a [deps] rev dartdoc, lints, matcher, protobuf, tools, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (https://github.com/dart-lang/dartdoc/compare/f7e9b17..53da3e1):
  53da3e1d  2023-10-23  dependabot[bot]  Bump actions/checkout from 4.1.0 to 4.1.1 (#3544)
  62d5469d  2023-10-23  Sam Rawlins  Support extension types in sidebars and categories (#3537)
  69abd0f0  2023-10-22  Sam Rawlins  Refactor file-gathering logic (#3539)
  e9c61d1d  2023-10-22  Sam Rawlins  Convert some late final fields to getters in Accessor, Annotation, Constructor (#3534)
  adcdc8b7  2023-10-20  Parker Lougheed  Update package:lints to v3 (#3542)
  41f02622  2023-10-19  Sam Rawlins  Greatly simplify ModelCommentReference (#3541)
  50e4b679  2023-10-19  Sam Rawlins  Remove use of NodeLocator2 (#3538)
  b2de813c  2023-10-19  Sam Rawlins  Remove support for deprecated leading new in comment references (#3529)
  b350c688  2023-10-19  Sam Rawlins  Bump to 7.0.1 (#3540)
  5256e2fb  2023-10-19  Sam Rawlins  Remove unused warnings (#3533)

lints (https://github.com/dart-lang/lints/compare/975c687..2cf8403):
  2cf8403  2023-10-23  Devon Carew  add no_wildcard_variable_uses; rev to a new major version (#165)
  7b0f556  2023-10-23  Parker Lougheed  Remove mention of no_wildcard_variable_uses from changelog (#164)

matcher (https://github.com/dart-lang/matcher/compare/356e5f6..7512f80):
  7512f80  2023-10-23  Michael Goderbauer  Specify language in neverCalled docs for nicer formatting in docs (#230)

protobuf (https://github.com/dart-lang/protobuf/compare/050c162..3528fad):
  3528fad  2023-10-24  Ömer Sinan Ağacan  Use `setRange` when copying output chunks to the final buffer in `CodedBufferWriter` (#887)

tools (https://github.com/dart-lang/tools/compare/15cc9c7..da6bb18):
  da6bb18  2023-10-24  Elias Yishak  Enum + event constructors added for doctor events (#178)
  e3dd149  2023-10-24  Elias Yishak  Use futures list internally to manage send events (#184)

webdev (https://github.com/dart-lang/webdev/compare/1bd434b..6e324af):
  6e324afb  2023-10-24  Ben Konyi  Add dependency on `package:vm_service_interface` (#2262)
  8429a79f  2023-10-20  Elliott Brooks  Only notify chatroom when daily stable testing fails (#2259)
  3463d169  2023-10-19  Elliott Brooks  Remove Chrome 115 extension error (#2258)
  fdebc06e  2023-10-19  Elliott Brooks  Reset Webdev to 3.2.0-wip after release (#2260)
  9cffb896  2023-10-19  Elliott Brooks  Reset DWDS to 22.1.0-wip after release (#2256)
  07c70c6c  2023-10-19  Elliott Brooks  Prepare Webdev for release to 3.1.0 (#2255)

Change-Id: Ieae3aadcc804a270867d7935b702987cf1f6d51c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332060
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-24 20:32:48 +00:00
Danny Tuppeny ea5e58356b [analysis_server] Fix logging of LSP-over-Legacy requests to use the LSP identifiers
Otherwise they'll be recorded as "lsp.handle".

Change-Id: I511d5eef44d6d647fef4d0347a03f6a7a9f88f9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-08-07 14:27:12 +00:00
eliasyishak 34f0e26d45 Swapping NoopAnalytics for noop from package:unified_analytics
Change-Id: I3419a128830ae434fa37bd10a1fc8a3da146fd89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Elias Yishak <eliasyishak@google.com>
2023-07-14 19:15:20 +00:00
Brian Wilkerson 45572cf7dd Pull in a new version of unified_analytics and update server
Change-Id: I7f63b55fc6a74f2adfc97f00950ca0516bae68ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310965
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-27 13:35:08 +00:00
Brian Wilkerson 3a870a3056 Fix another place where the plugin id leaks the path
Change-Id: I6a399917ec0bdfab74bea027b04a6d416eec3999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309824
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-15 22:49:57 +00:00
Brian Wilkerson 022fd17a62 Only include ids of plugins hosted on pub.dev
For extra safety I want to ensure that the plugin is hosted on pub.dev.

Change-Id: I7f2a2f4b85ad6263a97a0927653fb0b688c79224
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309400
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-15 17:54:57 +00:00
Brian Wilkerson 1b7837fb52 Reduce the number of data-points reported for percentiles
Change-Id: Icbdc4895d7cc862caf6a40ce1738540a4becee69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309540
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-06-15 17:04:17 +00:00
Brian Wilkerson 802a139912 Stop using a file path as a plugin id
Change-Id: I14077207e3c7163aceeeaad7491aa4d7b8d852ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308965
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-06-13 21:33:17 +00:00
Danny Tuppeny 9745fbe70d [analysis_server] Log when fixes and assists are used
Change-Id: I989e55aa8501c9b768ee72ad76c9266e8b0d0253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/305860
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-26 15:10:31 +00:00
Polina Cherkasova c192336dde Add auto-snapshotting and usage reporting.
Change-Id: I84b48cc750638ab3bcc138f2a0425442559e6d54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304212
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2023-05-22 18:00:26 +00:00
Ilya Yanok 0c5e1e8e48 Revert "Add auto-snapshotting and usage reporting."
This reverts commit 5fa6c5ed2a.

Reason for revert: breaks G3, we need to update //third_party/dart/leak_tracker first

Original change's description:
> Add auto-snapshotting and usage reporting.
>
> First attempt merged without passing bots and was rolled back: https://dart-review.googlesource.com/c/sdk/+/300862
>
> Change-Id: I782bf4d92394055e1f60a4275b5045e3622e239f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304101
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Polina Cherkasova <polinach@google.com>

Change-Id: I8f1643e20f8d134cbf917dc43731798a1234cc2b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304181
Commit-Queue: Ilya Yanok <yanok@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2023-05-17 22:03:17 +00:00
Polina Cherkasova 5fa6c5ed2a Add auto-snapshotting and usage reporting.
First attempt merged without passing bots and was rolled back: https://dart-review.googlesource.com/c/sdk/+/300862

Change-Id: I782bf4d92394055e1f60a4275b5045e3622e239f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304101
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Polina Cherkasova <polinach@google.com>
2023-05-17 17:56:47 +00:00
Daco Harkes dba0758120 Revert "Add auto-snapshotting and analytics for memory usage."
This reverts commit 5f1e7ade45.

Reason for revert: bots are failing

Original change's description:
> Add auto-snapshotting and analytics for memory usage.
>
> See video linked to issue: https://github.com/flutter/devtools/issues/5606
>
> Change-Id: I9f22031871e30bc7160e2c49b0423fb64df62223
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300862
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Jacob Richman <jacobr@google.com>

Change-Id: I54cb3943230ab1229cc8b2c9df40e9c71765df19
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303881
Auto-Submit: Polina Cherkasova <polinach@google.com>
Reviewed-by: Polina Cherkasova <polinach@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-05-17 07:43:26 +00:00
Polina Cherkasova 5f1e7ade45 Add auto-snapshotting and analytics for memory usage.
See video linked to issue: https://github.com/flutter/devtools/issues/5606

Change-Id: I9f22031871e30bc7160e2c49b0423fb64df62223
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300862
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Jacob Richman <jacobr@google.com>
2023-05-16 20:15:12 +00:00
Brian Wilkerson aa75db8cb2 Fix race condition in analytics
I don't know how to write a test that ensures that we will attempt to
modify the collections after entering the for loop. Suggestions welcome.

Bug: https://github.com/dart-lang/sdk/issues/52263
Change-Id: Ifc13e80594bd08f6c485d8898eb7c75b31172992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301780
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-05-05 21:02:29 +00:00
Janice Collins 1abf129bf8 Enable crash reporting via the unified_analytics consent mechanism.
This pulls in the `okToSend` method from https://github.com/dart-lang/tools/pull/79 in the tools repository.

Bug: https://github.com/dart-lang/sdk/issues/28633
Change-Id: I512d041750050338699d3635ba426cc0acdd5a20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2023-04-14 17:29:28 +00:00
Devon Carew b603d4c4ac [deps] rev tools, web_socket_channel, webdev
Revisions updated by `dart tools/rev_sdk_deps.dart`.

tools (https://github.com/dart-lang/tools/compare/cd799be..58d9147):
  58d9147  2023-04-07  Christopher Fujino  [unified_analytics] Add NoOpAnalytics (#77)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/40eb236..b28bae6):
  b28bae6  2023-04-07  Rexios  Allow passing through custom http client in IO socket connect (#259)
  1064b47  2023-04-07  Nate Bosch  Fix deprecated_new_in_comment_reference (#262)

webdev (https://github.com/dart-lang/webdev/compare/22b34e3..7546291):
  75462913  2023-04-07  Elliott Brooks  Run mono_repo generate (#2081)
  9964ebab  2023-04-07  dependabot[bot]  Bump actions/labeler from 4.0.2 to 4.0.3 (#2067)
  3dee56b5  2023-04-07  Anna Gringauze  Remove eval error message on async frames (#2073)
  d6b3e9ce  2023-04-07  Elliott Brooks  Dart Code Metrics follow-up (#2072)
  48e3211a  2023-04-07  Elliott Brooks  Update the release script to take into account `pubspec_overrides.yaml` (#2080)
  fd75f511  2023-04-06  Elliott Brooks  Reset Webdev to 3.0.5-dev (#2077)

Change-Id: Iac863f7c4822fe6b9585e80e95d69467e8d60b6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294364
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2023-04-10 17:44:36 +00:00
Keerti Parthasarathy 5c5f4ef65e Add a timer to send analytics data periodically.
Change-Id: Iaf58e3b7f45868579892ded8c005843d2f45b443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2023-04-04 03:27:27 +00:00
Janice Collins 27d6918ab9 Update for vscode only and latest version of unified_analytics for
analysis server.

Change-Id: I6a5e8a4424ccdf8a40c08a3cd2d697c2108422e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292201
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-31 22:17:14 +00:00
Brian Wilkerson 94db2c3da9 Add support for reporting analysis data to analytics
My primary goal from this review is to get feedback on whether this
looks like the right data to collect. Of course, any other feedback is
also appreciated.

Landing this will not cause any additional analytics to be collected,
but will allow us to locally explore the data that would be collected
in order to verify it's usefulness.

Change-Id: I2eaa2630673d181695d10f75d98e99f771a6f80c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288380
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-03-28 00:53:11 +00:00
Janice Collins 68353d76a4 Add a flag to disable the new unified_analytics for a single session.
- Adds a new flag, `--suppress-analytics` to the `dart` command to
  disable both the unified and the legacy analytics for a single
  session while deprecating the existing flag, `--[no-]analytics` used
  for disabling the legacy analytics on a single pass.
- Pipelines the flag from `dart` through `dart analyze` and `dart fix`
  to the execution of the analysis server.
- Updates all applicable uses of `dart analyze`, `dart fix`, and the
  analysis_server binary entry points in the SDK to disable analytics
  for the test infrastructure.

Bug: https://github.com/dart-lang/sdk/issues/49445
Change-Id: I1302cad7e04b21454aa7d9e8ee72a876b231377d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287661
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
2023-03-16 18:00:57 +00:00
Brian Wilkerson a4a255e1a9 Reland: Convert the AnalyticsManager to use the analytics package
Change-Id: Id3fd3fa172a77fe081ad3f718ba2c893dfd550e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-06 17:24:17 +00:00
Brian Wilkerson 07c5db4d53 Revert "Convert the AnalyticsManager to use the analytics package"
This reverts commit 0b8986902e.

Reason for revert: Breaks downstream systems

Original change's description:
> Convert the AnalyticsManager to use the analytics package
>
> Change-Id: Id1822668e0ed7e12e88e990fa02247616b2e54e6
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285400
> Reviewed-by: Elias Yishak <eliasyishak@google.com>
> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
> Reviewed-by: Keerti Parthasarathy <keertip@google.com>

Change-Id: Ief9d611cf1259ae460c38fadb299f9e09d74d0f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286242
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
2023-03-01 19:37:16 +00:00
Brian Wilkerson 0b8986902e Convert the AnalyticsManager to use the analytics package
Change-Id: Id1822668e0ed7e12e88e990fa02247616b2e54e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/285400
Reviewed-by: Elias Yishak <eliasyishak@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2023-03-01 17:54:52 +00:00