Commit graph

151 commits

Author SHA1 Message Date
Jens Johansen a0f71d4f6b [analyzer] Make benchmark report memory usage in bytes to make golem happy
Initial commit at https://dart-review.googlesource.com/c/sdk/+/276100
used kb because that's what was reported by the system.
I wasn't allowed to add that to golem though, and then I forgot about
it.
This CL changes it to bytes so it can hopefully by allowed into golem.

Change-Id: Ia7fae9ed47e6d237648e266c26f4a644f13571d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-06-20 06:07:48 +00:00
Konstantin Shcheglov 0704d96e8f Fix DAS completion benchmarks, after Flutter change.
After 73e1f23426 (diff-20c19d254b0a82027625f1246ba51cb2264bfabf105fe91d532c19e6a6d77478)

Change-Id: Ibcb0327aa71c8d0d9bda3af71cbec582acbdbd9b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308960
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-06-13 15:52:18 +00:00
Paul Berry a83a1a4c55 Revert "Update comments and readmes to specify dart run --no-pub when necessary."
This reverts commit d2df7ce24a.

Reason for revert: https://dart-review.googlesource.com/c/sdk/+/291500 was reverted

Original change's description:
> Update comments and readmes to specify `dart run --no-pub` when necessary.
>
> Now that https://dart-review.googlesource.com/c/sdk/+/291500 has
> landed, `dart run` now tries to invoke `dart pub` before execution.
> This doesn't work when running scripts inside the SDK, because the SDK
> doesn't use pub to get its dependencies.  So scripts in the SDK now
> need to be run with `--no-pub`.
>
> Change-Id: Ic320b717b2d45278cd26d373ae0823c2935ce102
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292720
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I6c13510abde17f71694f362a8071c9c7fa519a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302364
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-05-09 20:38:49 +00:00
Paul Berry d2df7ce24a Update comments and readmes to specify dart run --no-pub when necessary.
Now that https://dart-review.googlesource.com/c/sdk/+/291500 has
landed, `dart run` now tries to invoke `dart pub` before execution.
This doesn't work when running scripts inside the SDK, because the SDK
doesn't use pub to get its dependencies.  So scripts in the SDK now
need to be run with `--no-pub`.

Change-Id: Ic320b717b2d45278cd26d373ae0823c2935ce102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292720
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-04-03 12:11:49 +00:00
Lasse R.H. Nielsen f6ac970290 Reland "Add class modifiers to dart:convert." again.
This is a reland of commit 608934e330

Can be landed when Flutter with https://github.com/flutter/flutter/pull/123211
has been rolled into internal repository.



Original change's description:
> Reland "Add class modifiers to `dart:convert`."
>
> This is a reland of commit b2f4cf3e01
>
> Commented out deprecation for now.
>
> Original change's description:
> > Add class modifiers to `dart:convert`.
> >
> > The usual approach:
> > Pure interfaces marked `interface`.
> > Pure implementation classes marked `final`.
> > Base classes marked `base` or nothing, and `mixin class` if reasonable.
> > Combined X/XBase/XMixin where possible.
> >
> > CoreLibraryReviewExempt: Aske is away
> > Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
>
> CoreLibraryReviewExempt: Approved in original.
> Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

CoreLibraryReviewExempt: Approved in original.
Change-Id: If157e1ef2339d7a06e99a1e402f2f8ac93550b83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290960
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-03-29 16:54:23 +00:00
Emmanuel Pellereau d0556f9c27 Revert "Reland "Add class modifiers to dart:convert.""
This reverts commit 608934e330.

Reason for revert: breaks google3. See b/274843808.

Original change's description:
> Reland "Add class modifiers to `dart:convert`."
>
> This is a reland of commit b2f4cf3e01
>
> Commented out deprecation for now.
>
> Original change's description:
> > Add class modifiers to `dart:convert`.
> >
> > The usual approach:
> > Pure interfaces marked `interface`.
> > Pure implementation classes marked `final`.
> > Base classes marked `base` or nothing, and `mixin class` if reasonable.
> > Combined X/XBase/XMixin where possible.
> >
> > CoreLibraryReviewExempt: Aske is away
> > Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
>
> CoreLibraryReviewExempt: Approved in original.
> Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

Change-Id: Ie438531e9b97658c86e242fabddbb8a2919f634b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290763
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2023-03-23 12:19:33 +00:00
Lasse R.H. Nielsen 608934e330 Reland "Add class modifiers to dart:convert."
This is a reland of commit b2f4cf3e01

Commented out deprecation for now.

Original change's description:
> Add class modifiers to `dart:convert`.
>
> The usual approach:
> Pure interfaces marked `interface`.
> Pure implementation classes marked `final`.
> Base classes marked `base` or nothing, and `mixin class` if reasonable.
> Combined X/XBase/XMixin where possible.
>
> CoreLibraryReviewExempt: Aske is away
> Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

CoreLibraryReviewExempt: Approved in original.
Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-03-22 15:34:38 +00:00
Alexander Aprelev f59e7d3aaa Revert "Add class modifiers to dart:convert."
This reverts commit b2f4cf3e01 because it breaks flutter analyze.

BUG=https://github.com/flutter/flutter/issues/123157

Original change's description:
> Add class modifiers to `dart:convert`.
>
> The usual approach:
> Pure interfaces marked `interface`.
> Pure implementation classes marked `final`.
> Base classes marked `base` or nothing, and `mixin class` if reasonable.
> Combined X/XBase/XMixin where possible.
>
> CoreLibraryReviewExempt: Aske is away
> Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

Change-Id: Ia79b9572e623a47ddbefd66efe270a6e3bbaa5e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2023-03-21 22:29:58 +00:00
Konstantin Shcheglov c7c2be07d6 Sort a few files.
Change-Id: I4f1343a4b45ab2871ca7aa3a6eeb221072a3845d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290265
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-21 21:40:48 +00:00
William Hesse 84f9338346 Run analysis benchmarks twice on Windows builder
The Windows builder analyzer-win-release is waiting for shards
to complete after running the analysis server benchmarks, so we
can run the benchmarks twice to get more better results.

Bug: b/74375756
Change-Id: I03f459aece293a7e0b0eed3f4c52c037e2d9641c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290061
Reviewed-by: Alexander Thomas <athom@google.com>
2023-03-21 10:11:23 +00:00
Lasse R.H. Nielsen b2f4cf3e01 Add class modifiers to dart:convert.
The usual approach:
Pure interfaces marked `interface`.
Pure implementation classes marked `final`.
Base classes marked `base` or nothing, and `mixin class` if reasonable.
Combined X/XBase/XMixin where possible.

CoreLibraryReviewExempt: Aske is away
Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2023-03-20 13:27:17 +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
William Hesse 4b3bd7564c Add upload tool for analysis_server benchmarks.
Bug: b/74375756
Change-Id: I480188f7f021e571cb276bddaf1da2eef4991b08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283660
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-03-15 15:59:25 +00:00
Sam Rawlins 16e935ebad analysis_server: Prefer type annotations over raw types in benchmark/, tool/
Change-Id: I2f0c8bfd484f5aee46395fa86cd3cfabda7c0148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286204
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-01 20:40:43 +00:00
Sam Rawlins bb9371f255 [analyzer] Tidy up much benchmark and integration test code:
* Add a type argument to raw `Future` types (typically `Future<void>`)
* Add type arguments to raw `Map` types (typically Map<String, Object?>`)
* Add a type argument to raw `Completer` constructor calls.
* Use collection-elements in more places.
* Replace an implementation of `String.padLeft` and `String.padRight` with
  StringBuffer extension methods that use `String.padLeft` and
  `String.padRight`.
* Rename many `sb` variables to `buffer`, which is more idiomatic.
* Move some StringBuffer helper methods to be extensions on StringBuffer.
* Use constructor tear-offs instead of closures which call a constructor.
* Use single quotes where we can.
* Do not prefix constant names with the letter 'k' [1].
* In IntegrationTestMixin:
  * Rename to `IntegrationTest`, as it is never used as a mixin.
  * Public Stream fields are converted to be getters.
  * Private StreamController fields are initialized at their declaration [2],
    instead of an initialization method.
* Remove empty zero-parameter constructors.

[1] https://dart.dev/guides/language/effective-dart/style#dont-use-prefix-letters
[2] https://dart.dev/guides/language/effective-dart/usage#do-initialize-fields-at-their-declaration-when-possible

Change-Id: I7a923a80d32f74fbecf42a0fa35ae25285994097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/281874
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-02-09 22:41:19 +00:00
Sam Rawlins ca844e74e0 [analyzer] Rename all 'servicesPort' variables to 'servicePort'
I am going to plumb some of this support through the flutter_tools
side, and want a consistent name for this port. 'servicePort' seems to
be more correct.

Change-Id: I73806e1d4c566a82605812504cb354c2b59710ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280562
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-02-03 01:35:28 +00:00
Ahmed Ashour 2bc3d0ef6e [analysis_server] fix benchmark tests
Fixes #51207

Change-Id: I3bd20fa283ed60cfd3610edfc517a3872206f654
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-02-01 21:56:27 +00:00
Ahmed Ashour d5d7cc967f [analyzer] fix typo in class name
Fixes #51080

Change-Id: Id8bb271110d0753eb2fd3c794ca1b03cf64d3765
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279385
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2023-01-20 17:02:17 +00:00
Jens Johansen fa88e0c91f [analyzer] Add benchmarks of running dart analyze
This CL:
  * Adds a benchmark of running `dart analyze` on a single small file.
  * Adds a benchmark of running `dart analyze` on a single project.
  * Adds a benchmark of running `dart analyze` on several projects.
  * Adds a hidden flag to `dart analyze` so it reports ram usage:
    run via `dart analyze --format=json --memory` and the memory
    usage will be reported in the json output.

All the bencmarks run without and with cache for speed testing, and
without and with cache when measuring memory usage.

The idea of running this via `dart analyze` instead of running either
the script or the snapshot is to measure the "real world" speed which
could be different (although in practise it _does_ just run the
snapshot).

Future CL(s) should also add benchmarks for queries using the
language server.

Change-Id: Iad6d6d72c1a2ed18ab51d056b4914f8b6eb963e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/276100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-12-19 08:22:32 +00:00
Sam Rawlins 100f78daf6 Enforce new lint rules in pkg/analysis_server
Change-Id: I2fd938e5bc44f0798429b68524abc5718211c0ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270482
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-11-18 22:36:57 +00:00
Jens Johansen 5b68279417 [analyzer] Fix timing issue in benchmark
When I run
`out/ReleaseX64/dart-sdk/bin/dart pkg/analysis_server/benchmark/benchmarks.dart run analysis-server`
locally the process often doesn't finish because of a timing bug.
This fixes the one I'm running in to.

Change-Id: Ie94de8c4bb59211bff39ca2df1f8dd63fc53cc75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-11-17 14:46:59 +00:00
Konstantin Shcheglov 33295f8247 Add more await or unawaited() to DAS.
Change-Id: I45b2b988141c235b6fbe50e69fa018627e20e004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251146
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-07-12 00:59:01 +00:00
Danny Tuppeny 23f1c542e4 [analysis_server] Disallow Extract Method on nullable type names and import prefixes
Fixes https://github.com/Dart-Code/Dart-Code/issues/4029 (and maybe https://github.com/dart-lang/sdk/issues/48824).

Change-Id: I52a975a830733062dacdf72f06418f4b67d3318b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249600
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-23 16:04:55 +00:00
Ahmed Ashour 85700570f6 Fix typos
Fixes #49241

TEST=ci

Change-Id: I6117bf816fc8c4613cce66927f952fef75632725
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248120
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-06-15 11:08:28 +00:00
Sam Rawlins f397ecb588 Satisfy library_private_types_in_public_api in analyzer
This involves changes of a few flavors:

* Make classes private which were unnecessarily public.
* Make class elements private which were unnecessarily public.
* Comment in places where a "public" API contains a private type,
  but this is because of the signature of a super-member. I think
  these are generally quite safe.

Change-Id: Ied1864202cc256205a3b421ddec5513f0a22a608
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243647
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-22 01:45:33 +00:00
Ahmed Ashour 77da5016fe [analysis_server] remove ignore of no_leading_underscores_for_local_identifiers in generated file
Part of #49059

Change-Id: I9d8771e71ca505d61442bc04b9f71fd02f1c7d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-05-20 15:54:53 +00:00
Danny Tuppeny 80fb1a56db [analysis_server] Add shared protocol.dart file for LSP
In an upcoming change some types will between these files. To reduce the size of that (already very large) CL and because the distinction between spec-generated/custom-generated types was unnecessary anyway, this adds a single import for LSP protocol-related types.

Change-Id: I322447d6c979538c12014d87875176e1bf2adca7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244244
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-05-11 15:28:35 +00:00
pq 68fa0e96d0 rename local functions with _s
These will be flagged by the next linter release which updates `non_constant_identifier_names` to flag local functions.

Change-Id: If663698d9cab270accd477a507071232905bc083
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-27 00:23:06 +00:00
Konstantin Shcheglov 833795d54c Enforce use_super_parameters in analysis_server/.
Change-Id: I834e56b62df36782772e299e4279c408e9f8ec0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241241
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-15 18:13:44 +00:00
pq 16b436151a migrate server to recommended lints
See: https://github.com/dart-lang/sdk/issues/48785

Change-Id: I1bec40cc0b52e5df5f07c35ec993e08c56a59cbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240907
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-04-12 13:34:12 +00:00
Konstantin Shcheglov dafe470477 Update completion benchmarks to the new protocol.
Stop subscribing for AVAILABLE_SUGGESTION_SETS.

Change-Id: I93aa0f1227d766346a115327d1f79e95739a2435
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-10 17:35:30 +00:00
Konstantin Shcheglov ada0ad2033 Add --dart-sdk option to analyzer flutter benchmarks.
Change-Id: I741af3c709acac3893ff6f8a4ec694006fdbce26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240042
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-05 19:13:33 +00:00
Konstantin Shcheglov 8d8da75060 Stop using package:intl, but keep in DEPS.
Initial: https://dart-review.googlesource.com/c/sdk/+/224660
Reverted: https://dart-review.googlesource.com/c/sdk/+/225260
Change-Id: I66ef3126997c4f564e4181bbe185a1f64abf43e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225324
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-22 01:17:04 +00:00
Konstantin Shcheglov 73cfe523e0 Revert "Stop using package:intl, remove it from DEPS."
This reverts commit b0d7c56e84.

Reason for revert: breaks Golem, we need these benchmarks.

Original change's description:
> Stop using package:intl, remove it from DEPS.
>
> Change-Id: I7a6c036f7cd2c5ac64b0ab5a8b87bed1b9f34034
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224660
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

TBR=scheglov@google.com,brianwilkerson@google.com,srawlins@google.com

Change-Id: I39d4a2c773063da4dfa75404b64987f85dbcf764
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 19:08:24 +00:00
Konstantin Shcheglov b0d7c56e84 Stop using package:intl, remove it from DEPS.
Change-Id: I7a6c036f7cd2c5ac64b0ab5a8b87bed1b9f34034
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 17:19:53 +00:00
Konstantin Shcheglov 8f249569ad Tweak counts for warm-ups and repeats.
Change-Id: I43c3eff0fee7ea551f268536334702bab521f798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222323
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-07 21:08:59 +00:00
Sam Rawlins 973f2b17e0 Remove some implicit casts in analysis_server
There are a lot of implicit casts, so this CL includes:
benchmark/, many in test/, and tool/.

Most changes are quite mechanical, using `Object?`.

I also changed some functions to use types other than `dynamic`.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: Id77037aae71d41e2bdca52958fdc01c43d3d51a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221885
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-02 22:21:47 +00:00
Konstantin Shcheglov d5086e4ca9 Check that --flutter-repository is absolute and normalized, rename shorter.
Change-Id: I737dd5ea5ba83124b308f979bff50ed15cefcdf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220063
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-11-11 21:59:01 +00:00
Konstantin Shcheglov 35d8514d01 Make --flutter-repository a required option for Flutter based benchmarks.
We can change FlutterAnalyzeBenchmark because it is not actually
run now, the benchmarking framework calls `flutter analyze` directly.
This class is just FYI.

Flutter completion benchmarks are not used yet, so we can change
them as well.

Change-Id: I1426df572b6c37160076785f9a5a4b742ce36221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-28 17:26:28 +00:00
Konstantin Shcheglov f3e99c43c8 Tweaks for DAS flutter benchmarks.
1. Implement oneTimeCleanup()
2. Run not 4, but 2 times.
3. Name it `das-flutter`, to add `edit` benchmarks later.

Change-Id: I4b1cc2e400a48f69901a9710ea8345371e64cfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-10-11 19:37:04 +00:00
Konstantin Shcheglov bc5a1138e0 Add several Flutter completion benchmarks.
When running DAS from sources, so might be not exactly as when running
from the snapshot, currently we have following numbers:

Before reverting to allow available declarations:
{das-flutter-completion-start: {micros: 15030209}, das-flutter-completion-smallFile-body: {micros: 619210}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 484791}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 2348386}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 3701027}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 3332297}}

Current 2021-09-30 master:
{das-flutter-completion-start: {micros: 15194069}, das-flutter-completion-smallFile-body: {micros: 22721}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 7796}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 552269}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 3076925}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 3010509}}

Current 2021-10-01 master, with snapshot:
{das-flutter-completion-start: {micros: 6657503}, das-flutter-completion-smallFile-body: {micros: 20596}, das-flutter-completion-smallFile-body-withoutPrefix: {micros: 7073}, das-flutter-completion-smallLibraryCycle-largeFile-smallBody: {micros: 556415}, das-flutter-completion-mediumLibraryCycle-mediumFile-smallBody: {micros: 85024}, das-flutter-completion-mediumLibraryCycle-mediumFile-api-parameterType: {micros: 331850}}

Change-Id: I1d76f4f15d36e316b553ffc6cfaf24551c7f9bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215240
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-10-01 18:01:49 +00:00
Konstantin Shcheglov e24865a79e Tweaks for benchmarks.
Change-Id: Ic297a845af1e530e7fdf22b9e910d2e725be4e99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214871
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-30 01:29:30 +00:00
Alexander Aprelev 21cbb2ae3a [analysis_server/benchmark] Fix memory usage calculation to avoid double-counting.
When several isolates share same isolate group, they share the same heap.
This change iterates over isolate groups and aggregates their heap size instead of iterating over isolates.

Change-Id: I83b04110277b3a2d22ab758b50ee8c4ce480ea7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212382
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-03 19:02:27 +00:00
Konstantin Shcheglov 78fd1fb758 Format analysis_server/ and analyzer_plugin/.
R=brianwilkerson@google.com

Change-Id: Ib3140b9a7e1dbefd7106cc471574d210b359e7bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212221
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-09-01 21:08:56 +00:00
Konstantin Shcheglov f398c9f3c1 Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE in analyzer/ and friends.
Change-Id: I1019d9c083b825a9f3418bc56ed410e0ba5501fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204085
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-18 16:07:26 +00:00
Konstantin Shcheglov 7b9cfb4837 Restore caching of converter in InputConverter.
Change-Id: Ie801d8b7b29f40cd624690d31de1f883cd08260e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 20:20:15 +00:00
Brian Wilkerson 1ad68b9b16 Make local variables that hide fields be final (analysis_server)
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.

Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-04-24 18:12:07 +00:00
Brian Wilkerson 30d27c6f61 Migrate all remaining server libraries except the library in bin
Change-Id: I2041763971a85fb8e9530b64ef30d106091c9739
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196547
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-04-24 04:19:22 +00:00
Konstantin Shcheglov 1bf4b0ce2f Migrate benchmark/integration/
R=brianwilkerson@google.com

Change-Id: I0dccc13831ec5aed82d33ee52ffeae1ad38c5b98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194109
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-04-06 21:10:33 +00:00
Konstantin Shcheglov e97f1bdbf0 Switch analysis_server to language 2.12, so null safety, but opt-out files.
This should allow doing partial migration, specifically protocol files,
which are imported by other libraries, but are a small library cycle
that does not import much outside of it.

Change-Id: I904c05d6d5b444ee9a9dbd1f7ada12aabdcc5165
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-30 23:39:37 +00:00