james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [08/14] james-project git commit: JAMES-1950 Introduce TimeMetric api
Date Fri, 03 Mar 2017 17:26:16 GMT
JAMES-1950 Introduce TimeMetric api


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/8f7fbc21
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/8f7fbc21
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/8f7fbc21

Branch: refs/heads/master
Commit: 8f7fbc2141e6d5d7fa32d800e49ea87e99210d11
Parents: c06aeac
Author: Antoine Duprat <aduprat@linagora.com>
Authored: Thu Feb 23 15:31:45 2017 +0100
Committer: Antoine Duprat <aduprat@linagora.com>
Committed: Fri Mar 3 18:17:20 2017 +0100

----------------------------------------------------------------------
 .../apache/james/metrics/api/MetricFactory.java |  1 +
 .../apache/james/metrics/api/TimeMetric.java    | 27 ++++++++++++++++++++
 2 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/8f7fbc21/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
index b007428..2115197 100644
--- a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
+++ b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
@@ -23,4 +23,5 @@ public interface MetricFactory {
 
     Metric generate(String name);
 
+    TimeMetric timer(String name);
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f7fbc21/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/TimeMetric.java
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/TimeMetric.java
b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/TimeMetric.java
new file mode 100644
index 0000000..63220a7
--- /dev/null
+++ b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/TimeMetric.java
@@ -0,0 +1,27 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+package org.apache.james.metrics.api;
+
+public interface TimeMetric {
+
+    String name();
+
+    long stopAndPublish();
+
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message