Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
pankaj
2014-10-02 16:38:38 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6577b68dcb055d9c6333f0c7ddd80495ea3d623
f6577b68
1 parent
f1eab297
Create a component for metrics
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
utils/misc/pom.xml
utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
utils/misc/pom.xml
View file @
f6577b6
...
...
@@ -60,6 +60,10 @@
<artifactId>
metrics-core
</artifactId>
<version>
3.1.0
</version>
</dependency>
<dependency>
<groupId>
org.apache.felix
</groupId>
<artifactId>
org.apache.felix.scr.annotations
</artifactId>
</dependency>
</dependencies>
</project>
...
...
utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java
View file @
f6577b6
...
...
@@ -7,6 +7,10 @@ import java.util.concurrent.ConcurrentHashMap;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.TimeUnit
;
import
org.apache.felix.scr.annotations.Activate
;
import
org.apache.felix.scr.annotations.Component
;
import
org.apache.felix.scr.annotations.Deactivate
;
import
com.codahale.metrics.Counter
;
import
com.codahale.metrics.CsvReporter
;
import
com.codahale.metrics.Gauge
;
...
...
@@ -49,6 +53,7 @@ import com.codahale.metrics.Timer;
* </code>
* </pre>
*/
@Component
(
immediate
=
true
)
public
final
class
MetricsManager
implements
MetricsService
{
/**
...
...
@@ -79,6 +84,14 @@ public final class MetricsManager implements MetricsService {
reporter
.
start
(
10
,
TimeUnit
.
SECONDS
);
}
@Activate
public
void
activate
()
{
}
@Deactivate
public
void
deactivate
()
{
}
/**
* Registers a component.
*
...
...
Please
register
or
login
to post a comment