Skip to content

Commit

Permalink
Disable all the metrics by default
Browse files Browse the repository at this point in the history
The default configuration is sub-optimal since the metrics are enabled
by default and hence collecting all the data, but there are no
reporters (e.g., CSV, Ganglia, Graphite) enabled by default hence we
basically collect data that will never been read.  This change will
disable everything in the metrics extension in order to solve this
problem.
  • Loading branch information
davidegrohmann committed Nov 24, 2015
1 parent 2516a1b commit bdd46c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -53,7 +53,7 @@ public enum CsvFile
@Description( "The default enablement value for all the supported metrics. Set this to `false` to turn off all " +
"metrics by default. The individual settings can then be used to selectively re-enable specific " +
"metrics." )
public static Setting<Boolean> metricsEnabled = setting( "metrics.enabled", Settings.BOOLEAN, Settings.TRUE );
public static Setting<Boolean> metricsEnabled = setting( "metrics.enabled", Settings.BOOLEAN, Settings.FALSE );

@Description( "The default enablement value for all Neo4j specific support metrics. Set this to `false` to turn " +
"off all Neo4j specific metrics by default. The individual `metrics.neo4j.*` metrics can then be " +
Expand Down
Expand Up @@ -35,7 +35,6 @@
import org.neo4j.graphdb.GraphDatabaseService;
import org.neo4j.graphdb.Transaction;
import org.neo4j.graphdb.factory.GraphDatabaseFactory;
import org.neo4j.graphdb.factory.GraphDatabaseSettings;
import org.neo4j.helpers.Settings;
import org.neo4j.helpers.collection.MapUtil;
import org.neo4j.test.TargetDirectory;
Expand All @@ -60,10 +59,10 @@ public class MetricsKernelExtensionFactoryIT
@Before
public void setup() throws IOException
{
String dbPath = folder.directory( "data" ).getAbsolutePath();
File dbPath = folder.directory( "data" );
outputFile = folder.file( "metrics.csv" );
db = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder( dbPath ).
setConfig( GraphDatabaseSettings.allow_store_upgrade, Settings.TRUE ).
setConfig( MetricsSettings.neoEnabled, Settings.TRUE ).
setConfig( csvEnabled, Settings.TRUE ).
setConfig( csvFile, single.name() ).
setConfig( csvPath, outputFile.getAbsolutePath() ).newGraphDatabase();
Expand Down

0 comments on commit bdd46c4

Please sign in to comment.