[ https://issues.apache.org/jira/browse/MNG-6899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Enrico Olivelli updated MNG-6899: --------------------------------- Description: The idea is to have a mechanism to track runtime metrics for Maven Core itself and for plugins. We introduce a new Metrics API that defines Counters, Summaries and other types of metrics. The default implementation of the Metrics API will be a no-operation dummy implementation, that does not add significant overhead at runtime. We will provide as separate modules an implementation that gathers all of the metric and output them to console or to a file, that can be easily parsed by tools, like Jenkins. I will also contribute an implementation for Prometheus.io, this way we can track how the system behaves at runtime, Prometheus.io and other metrics systems store time series data and this is very useful to track down to hotspots during Maven execution. For the first implementation we will introduce some base instrumentation of Maven Core, in order to have some useful metric. The Metrics System will be loaded from "Extensions" and we will use usual @Inject mechanism. Maven Core will bundle the noop implementation but it will be overridden by other implementations found on the main classloader of Maven, as we do for other compoments. Useful metrics to implement initially: - Maven mojo execution times - Maven model build time - Download of artifacts from remote repositories (needs Wagon intrumentation) - Reads/Writes from/to local repository This is the Proof-of-concept implementation on Maven Studies https://github.com/apache/maven-studies/tree/maven-metrics This is a simple implementation https://github.com/eolivelli/simplemavenmetrics Concrete steps for the implementation: - create a new Maven Module "maven-metrics" that contains the API and the "simple" implementation - include ONLY the maven-metrics-api module in Maven Core - Add basic intrumentation to Maven Core - Add basic intrumentation to Wagon and to Resolver was: The idea is to have a mechanism to track runtime metrics for Maven Core itself and for plugins. We introduce a new Metrics API that defines Counters, Summaries and other types of metrics. The default implementation of the Metrics API will be a no-operation dummy implementation, that does not add significant overhead at runtime. We will provide as separate modules an implementation that gathers all of the metric and output them to console or to a file, that can be easily parsed by tools, like Jenkins. I will also contribute an implementation for Prometheus.io, this way we can track how the system behaves at runtime, Prometheus.io and other metrics systems store time series data and this is very useful to track down to hotspots during Maven execution. For the first implementation we will introduce some base instrumentation of Maven Core, in order to have some useful metric. The Metrics System will be loaded from "Extensions" and we will use usual @Inject mechanism. Maven Core will bundle the noop implementation but it will be overridden by other implementations found on the main classloader of Maven, as we do for other compoments. > Maven Runtime Metrics System > ---------------------------- > > Key: MNG-6899 > URL: https://issues.apache.org/jira/browse/MNG-6899 > Project: Maven > Issue Type: New Feature > Components: Performance > Affects Versions: 3.6.3 > Reporter: Enrico Olivelli > Assignee: Enrico Olivelli > Priority: Major > Fix For: 3.7.0-candidate > > > The idea is to have a mechanism to track runtime metrics for Maven Core > itself and for plugins. > We introduce a new Metrics API that defines Counters, Summaries and other > types of metrics. > The default implementation of the Metrics API will be a no-operation dummy > implementation, that does not add significant overhead at runtime. > We will provide as separate modules an implementation that gathers all of the > metric and output them to console or to a file, that can be easily parsed by > tools, like Jenkins. > I will also contribute an implementation for Prometheus.io, this way we can > track how the system behaves at runtime, Prometheus.io and other metrics > systems store time series data and this is very useful to track down to > hotspots during Maven execution. > For the first implementation we will introduce some base instrumentation of > Maven Core, in order to have some useful metric. > The Metrics System will be loaded from "Extensions" and we will use usual > @Inject mechanism. Maven Core will bundle the noop implementation but it > will be overridden by other implementations found on the main classloader of > Maven, as we do for other compoments. > Useful metrics to implement initially: > - Maven mojo execution times > - Maven model build time > - Download of artifacts from remote repositories (needs Wagon intrumentation) > - Reads/Writes from/to local repository > This is the Proof-of-concept implementation on Maven Studies > https://github.com/apache/maven-studies/tree/maven-metrics > This is a simple implementation > https://github.com/eolivelli/simplemavenmetrics > Concrete steps for the implementation: > - create a new Maven Module "maven-metrics" that contains the API and the > "simple" implementation > - include ONLY the maven-metrics-api module in Maven Core > - Add basic intrumentation to Maven Core > - Add basic intrumentation to Wagon and to Resolver -- This message was sent by Atlassian Jira (v8.3.4#803005)