From c58fb2b3ef179b352dd4fd3f94640747ac782ff8 Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Thu, 1 Mar 2018 08:27:04 +0000 Subject: [PATCH 1/2] Add analytics to the list of plugins Change-Id: I9cde21138aa99ac2b13ba6c22be68a497f1a1e4d --- Documentation/config-plugins.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/config-plugins.txt b/Documentation/config-plugins.txt index cdb7ec7592..59287a44df 100644 --- a/Documentation/config-plugins.txt +++ b/Documentation/config-plugins.txt @@ -163,6 +163,18 @@ Project] | link:https://gerrit.googlesource.com/plugins/admin-console/+doc/master/src/main/resources/Documentation/about.md[ Documentation] +[[analytics]] +=== analytics + +Plugin to extract commit and review data from Gerrit projects and +expose aggregated metrics over REST and SSH API. +Metrics are extracted in JSON format with one record per line, ready to be +archived and processed with popular BigData transformation tools such +Apache Spark or published and visualized in dashboards. + +link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/analytics[Project] | +link:https://gerrit.googlesource.com/plugins/analytics/+doc/master/README.md[Documentation] + [[avatars-external]] === avatars-external From 612814ee48fada19f06f51cfc764a1d9e0e9397f Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Fri, 2 Mar 2018 10:10:49 +0900 Subject: [PATCH 2/2] BaseCommand: Fix formatting of task description with arguments The task name is being generated as the command name followed by the trimmed arguments, but without any space, for example: SSH gerrit plugin rmreadonly (admin) Fix it so that there is a space: SSH gerrit plugin rm readonly (admin) Change-Id: Ib5e0409a68527d810df25cd621e0e62f4442c02e --- .../src/main/java/com/google/gerrit/sshd/BaseCommand.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java index 59972e2119..c83bcc7683 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/BaseCommand.java @@ -394,12 +394,11 @@ public abstract class BaseCommand implements Command { } protected String getTaskDescription() { - StringBuilder m = new StringBuilder(commandName); String[] ta = getTrimmedArguments(); if (ta != null) { - m.append(Joiner.on(" ").join(ta)); + return commandName + " " + Joiner.on(" ").join(ta); } - return m.toString(); + return commandName; } private String getTaskName() {