[S] Change in dart/sdk[main]: Fine. Add set metric to OperationPerformance; track detail URIs

0 views
Skip to first unread message

Johnni Winther (Gerrit)

unread,
3:49 AM (13 hours ago) 3:49 AM
to Konstantin Shcheglov, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Konstantin Shcheglov

Johnni Winther voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Konstantin Shcheglov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic677e28b9ae98190ddc0243ac0cea01aa44e736f
Gerrit-Change-Number: 451940
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Attention: Konstantin Shcheglov <sche...@google.com>
Gerrit-Comment-Date: Mon, 29 Sep 2025 07:49:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
12:21 PM (4 hours ago) 12:21 PM
to Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

Konstantin Shcheglov voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic677e28b9ae98190ddc0243ac0cea01aa44e736f
Gerrit-Change-Number: 451940
Gerrit-PatchSet: 2
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Comment-Date: Mon, 29 Sep 2025 16:21:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Konstantin Shcheglov (Gerrit)

unread,
12:24 PM (4 hours ago) 12:24 PM
to Johnni Winther, Commit Queue, dart-analys...@google.com, rev...@dartlang.org

Konstantin Shcheglov voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic677e28b9ae98190ddc0243ac0cea01aa44e736f
Gerrit-Change-Number: 451940
Gerrit-PatchSet: 3
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
Gerrit-Reviewer: Johnni Winther <johnni...@google.com>
Gerrit-Reviewer: Konstantin Shcheglov <sche...@google.com>
Gerrit-Comment-Date: Mon, 29 Sep 2025 16:24:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
12:50 PM (4 hours ago) 12:50 PM
to Konstantin Shcheglov, Johnni Winther, dart-analys...@google.com, rev...@dartlang.org

Commit Queue submitted the change

Unreviewed changes

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
Fine. Add set metric to OperationPerformance; track detail URIs

Introduce a generic set-based performance datum and use it to record the
distinct libraries that require a full requirements check.

Changes:
- Add `OperationPerformanceDataImpl_Set<T>` which stores unique values and
formats as `name: <count>` to keep logs compact. Includes `add(T)` to
insert items.
- Add `OperationPerformanceImpl.getDataSet<T>(name)` to access/create set
metrics, mirroring `getDataInt`.
- In `RequirementsManifest.isSatisfied`, when a library’s
`hashForRequirements` does not match the manifest, continue to increment
`libDetails` and also add the library URI to the new `libDetailsUris` set.

Why:
- Distinguishes total detail checks (`libDetails`) from the number of
distinct libraries involved (`libDetailsUris`). This makes it easier to
diagnose fine-grained dependency behavior (e.g., a few libraries causing
many checks vs. many libraries each checked once).
- Avoids verbose logs by printing only the set’s size.

Impact:
- No functional changes to analysis; only additional metrics are recorded.
- Existing counters (`libHash`, `libDetails`) remain unchanged and
compatible with current log consumers.

Limitations:
- The current `OperationPerformance` design and naming are not ideal. This
change follows the existing pattern but increases the motivation to
refactor and simplify the API and names in a follow-up.
Change-Id: Ic677e28b9ae98190ddc0243ac0cea01aa44e736f
Reviewed-by: Johnni Winther <johnni...@google.com>
Commit-Queue: Konstantin Shcheglov <sche...@google.com>
Files:
  • M pkg/analyzer/lib/src/fine/requirements.dart
  • M pkg/analyzer/lib/src/util/performance/operation_performance.dart
Change size: S
Delta: 2 files changed, 31 insertions(+), 0 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Johnni Winther
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic677e28b9ae98190ddc0243ac0cea01aa44e736f
Gerrit-Change-Number: 451940
Gerrit-PatchSet: 4
Gerrit-Owner: Konstantin Shcheglov <sche...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages