Skip to content

Add an aggregate logger for inheritance margin#60493

Merged
Cosifne merged 2 commits intodotnet:mainfrom
Cosifne:dev/shech/ChangeLogger
Mar 31, 2022
Merged

Add an aggregate logger for inheritance margin#60493
Cosifne merged 2 commits intodotnet:mainfrom
Cosifne:dev/shech/ChangeLogger

Conversation

@Cosifne
Copy link
Member

@Cosifne Cosifne commented Mar 31, 2022

As discussed offline, because 'GetInheritanceItem' is frequently triggered by the view tagger, it generates a lot of telemetry log.
This PR change it to use a HistogramLogger, which reports the time of 'GetInheritanceItem' based on seconds. (0s -> 60s)
I feel it should still meet our needs since it doesn't make a lot of sense to know things like
'It takes 5.321 seconds to get the background data ready',
If it takes more than 1min to get it, then it is put in the last bucket and we should consider it as a time-out log

@Cosifne Cosifne requested a review from a team as a code owner March 31, 2022 00:20
@ghost ghost added the Area-IDE label Mar 31, 2022
@Cosifne Cosifne requested review from davkean and genlu March 31, 2022 00:20
internal static class InheritanceMarginLogger
{
// 1 sec per bucket, and if it takes more than 1 min, then this log is considered as time-out in the last bucket.
private static readonly HistogramLogAggregator s_histogramLogAggregator = new(1000, 60000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private static readonly HistogramLogAggregator s_histogramLogAggregator = new(1000, 60000);
private static readonly HistogramLogAggregator s_histogramLogAggregator = new(TimeSpan.FromSecons(1), TimeSpan.FromMinutes(1));

Copy link
Member Author

Choose a reason for hiding this comment

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

@Cosifne
Copy link
Member Author

Cosifne commented Mar 31, 2022

/azp run roslyn-CI

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Cosifne Cosifne merged commit 3999961 into dotnet:main Mar 31, 2022
@ghost ghost added this to the Next milestone Mar 31, 2022
@Cosifne Cosifne deleted the dev/shech/ChangeLogger branch March 31, 2022 21:14
333fred added a commit that referenced this pull request Apr 4, 2022
…ures/semi-auto-props

* upstream/main: (110 commits)
  Add Rebuild badge to README (#60298)
  Update PublishData.json for 17.3 P1 (#60559)
  Note auto-default merged in feature status doc (#60564)
  Update Roslyn.Diagnostics.Analyzers and remove RS0005 suppressions
  Cleanup unused resources in Features layer
  Remove unnecessary `<Compile Remove`
  Remove overrides in Features
  Remove overrides in Analyzers
  Remove the single unused read of CodeFixCategory
  Remove unused abstract property
  Update Language Feature Status.md (#60482)
  Document ROSLYN_TEST_USEDASSEMBLIES (#60478)
  Add BoundArrayInitialization.IsInferred (#60391)
  Add an aggregate logger for inheritance margin (#60493)
  Move StackTraceAnalyzer over to VirtualCharSequence (#60404)
  PR feedback
  Fix test and review feedback
  Update Spanish queue to Windows.10.Amd64.Server2022.ES.Open
  Enable NRT in AbstractSyncNamespaceCodeRefactoringProvider
  test
  ...
@Cosifne Cosifne restored the dev/shech/ChangeLogger branch April 19, 2022 01:58
@dibarbet dibarbet modified the milestones: Next, 17.3.P1 Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants