edgent-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomascristanis <...@git.apache.org>
Subject [GitHub] incubator-edgent pull request #314: Adding support for csv in MetricsSetup
Date Wed, 19 Jul 2017 15:49:16 GMT
Github user thomascristanis commented on a diff in the pull request:

    https://github.com/apache/incubator-edgent/pull/314#discussion_r128287802
  
    --- Diff: utils/metrics/src/main/java/org/apache/edgent/metrics/MetricsSetup.java ---
    @@ -104,15 +104,6 @@ public MetricsSetup startJMXReporter(String jmxDomainName) {
          */
         public MetricsSetup startCSVReporter(String pathMetrics) {
     
    -        if (pathMetrics == null) { // pathMetrics is NULL
    -            pathMetrics = createDefaultDirectory();
    -        } else {
    -            File directory = new File(pathMetrics);
    -            if (!directory.exists() && !directory.mkdirs()) {
    -                pathMetrics = createDefaultDirectory();
    -            }
    -        }
    -
    --- End diff --
    
    No, now it's just the argument of this method:
    
    `public MetricsSetup startCSVReporter(String pathMetrics) {
    
            final CsvReporter reporter = CsvReporter.forRegistry(registry()).formatFor(Locale.US)
                    .convertRatesTo(TimeUnit.SECONDS).convertDurationsTo(TimeUnit.MILLISECONDS)
                    .build(new File(pathMetrics));
            reporter.start(1, TimeUnit.SECONDS);
    
            return this;
        }`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message