Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Commit

Permalink
Removed Metrics Fixes #14
Browse files Browse the repository at this point in the history
* slf4j:
  Up to 2.1-SNAPSHOT
  latest vert.x version
  Forget that…  Bin metrics.
  Remove slf4j dependencies
  • Loading branch information
Tim Yates committed Aug 14, 2013
2 parents 7dcf8d7 + 794ac25 commit 101dd26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ install - install any jars produced to the local Maven repository (.m2)
dependencies {
compile "com.mchange:c3p0:$c3p0Version"
compile "commons-dbutils:commons-dbutils:$dbutilsVersion"
compile "com.yammer.metrics:metrics-core:$metricsVersion"
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
testCompile "junit:junit:$junitVersion"
testCompile( "io.vertx:testtools:$toolsVersion" ) {
Expand Down
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ modowner=com.bloidonia
modname=mod-jdbc-persistor

# Your module version
version=2.0.1
version=2.1-SNAPSHOT

# The test timeout in seconds
testtimeout=300
Expand All @@ -23,10 +23,10 @@ groovyVersion=2.1.5
gradleVersion=1.6

# The version of Vert.x
vertxVersion=2.0.0-final
vertxVersion=2.0.1-final

# The version of Vert.x test tools
toolsVersion=2.0.0-final
toolsVersion=2.0.1-final
testFrameworkVersion=2.0.0-final

# The version of JUnit
Expand All @@ -35,6 +35,5 @@ junitVersion=4.10
c3p0Version=0.9.5-pre3
dbutilsVersion=1.5
hsqldbVersion=2.2.9
metricsVersion=3.0.0-BETA1

rxVersion=1.0.0-beta1-SNAPSHOT
18 changes: 0 additions & 18 deletions src/main/java/com/bloidonia/vertx/mods/JdbcProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

import com.mchange.v2.c3p0.* ;

import com.yammer.metrics.JmxReporter ;
import com.yammer.metrics.Meter ;
import com.yammer.metrics.MetricRegistry ;
import static com.yammer.metrics.MetricRegistry.name ;

import java.sql.Connection ;
import java.sql.Driver ;
import java.sql.DriverManager ;
Expand Down Expand Up @@ -65,10 +60,6 @@ public class JdbcProcessor extends BusModBase implements Handler<Message<JsonObj
private int batchTimeout ;
private int transTimeout ;

private static MetricRegistry metrics ;
private static Meter requests ;
private static JmxReporter jmxReporter ;

private volatile static ConcurrentHashMap<String,ComboPooledDataSource> poolMap = new ConcurrentHashMap<String,ComboPooledDataSource>( 8, 0.9f, 1 ) ;

private static boolean setupPool( String address,
Expand Down Expand Up @@ -104,13 +95,6 @@ private static boolean setupPool( String address,
if( poolMap.putIfAbsent( address, pool ) != null ) {
pool.close() ;
}
else {
metrics = new MetricRegistry( String.format( "%s.metrics", address ) ) ;
requests = metrics.meter( name( JdbcProcessor.class, "requests" ) ) ;
jmxReporter = JmxReporter.forRegistry( metrics ).build() ;
jmxReporter.start() ;
return true ;
}
}
}
}
Expand All @@ -126,7 +110,6 @@ private static void closePool( String address, String url ) throws SQLException
if( pool != null ) {
pool.close() ;
DriverManager.deregisterDriver( DriverManager.getDriver( url ) ) ;
jmxReporter.stop() ;
}
}
}
Expand Down Expand Up @@ -203,7 +186,6 @@ public void stop() {

public void handle( final Message<JsonObject> message ) {
String action = message.body().getString( "action" ) ;
requests.mark() ;
if ( logger.isDebugEnabled() ) {
logger.debug( "** HANDLE ** " + this.toString() + " (main handler) RECEIVED CALL " + action ) ;
}
Expand Down

0 comments on commit 101dd26

Please sign in to comment.