-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatsCollector, Aggregators, MetricsConfiguration move #6
Conversation
- Moved in SampleAggregator singletons and their dependencies - Moved in StatReporter and its dependencies. - Created CommonsStats class to host aggregators and reporter for all repos. - Moved in MetricsConfiguration to be used by all repos. Fixed Lychee linker error with empty excludes file Signed-off-by: Filip Drobnjakovic <drobnjakovicfilip@gmail.com>
Signed-off-by: Filip Drobnjakovic <drobnjakovicfilip@gmail.com>
…liary classes. Signed-off-by: Filip Drobnjakovic <drobnjakovicfilip@gmail.com>
Signed-off-by: Filip Drobnjakovic <drobnjakovicfilip@gmail.com>
src/main/java/org/opensearch/performanceanalyzer/commons/collectors/StatExceptionCode.java
Show resolved
Hide resolved
src/main/java/org/opensearch/performanceanalyzer/commons/metrics/MetricsConfiguration.java
Show resolved
Hide resolved
/* Catalogue class that is to be populated upon PerformanceAnalyzerApp class load | ||
and to be used by both PA and PA-RCA as well as commons repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update the comment as :
" Catalog Operational Metrics class that is to be populated upon PerformanceAnalyzerApp class load and to be used by both PA and PA-RCA. "
One other question, is this class used at runtime by the commons repo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is commons code that is accessing the class, yes, for example StatsCollector code. In terms of runtime and chronological access those references are going to happen from both PA and PA-RCA side. Let me know if there are any concerns.
Thank you for making the changes @Tjofil. One high level comment I have is around naming of the sub-directories: Would it make sense to:
|
@khushbr |
Signed-off-by: Filip Drobnjakovic <drobnjakovicfilip@gmail.com>
This sounds good to me, let us retain the name of repo as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Ship it!
#2
This PR focuses on extracting three major components/component groups:
MetricsConfiguration
is a wrapper class around map that serves as configuration registry for all the collectors, both ones stored inPA
and ones stored inPA-RCA
repo. We don't do any initialization of the map entries from commons as that would require the class to know about collectors, which introduces dependencies from the two repos. Instead, we already have an initialization of this map from PA side which is done upon plugin class load, and the current initialization from inside class is going to be replaced with a symmetrical one that happens onPerformanceAnalyzerApp
class load.SampleAggregators
used to live asPerformanceAnalyzerApp
's static fields and Writer has to reach for this class in order to write to aggregators. We extract them in this PR, alongsideStatsReporter
by whom they are consumed, to a class calledCommonStats
which is visible to bothPA
andPA-RCA
repo and thus eliminatingPA
's need to know about the PA app class. They're still going to be initialized fromPA-RCA
code but used by both repos.StatsCollector
and everything necessary for it's functioning has also been moved to the repo, no changes were done to these classes. Note thatPA
andPA-RCA
have their own tests for different use cases ofStatsCollector
and these tests will remain inside their respective repos.Besides these extractions there is also a fix for Lychee link checker and tests for classes that had them inside their original repos.
There's also been a change to packages, generally small moves and flattening of the hierarchy and removal of
rca
subpackage as it was misleading in most of the cases.After this I'll publish two branches, one for PA and second for PA-RCA and make the changes to account for moving of the
MetricsConfiguration
, aggregators and StatsCollector so we can incrementally change the repos and make sure everything keeps working from their point of view.Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.