public class AutoTuneConfig extends Object
Constructor and Description |
---|
AutoTuneConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getGarbageCollectionWait()
Return the time in millis to wait after a system gc to collect profiling
information.
|
AutoTuneMode |
getMode()
Return the mode used when autoTune has not been explicit defined on a
query.
|
int |
getProfilingBase()
Return the base number of queries to profile before changing to profile
only a percentage of following queries (profileRate).
|
String |
getProfilingFile()
Return the name of the file that profiling information is written to.
|
double |
getProfilingRate()
Return the rate (%) of queries to be profiled after the 'base' amount of
profiling.
|
int |
getProfilingUpdateFrequency()
Return the frequency in seconds the profiling should be collected and automatically applied to the tuning.
|
String |
getQueryTuningFile()
Return the name of the file that holds the query tuning information.
|
boolean |
isActive()
Return true if we are profiling or query tuning.
|
boolean |
isProfiling()
Return true if profiling information should be collected.
|
boolean |
isQueryTuning()
Return true if the queries are being tuned.
|
boolean |
isQueryTuningAddVersion()
Return true if the version property should be added when the query is
tuned.
|
boolean |
isSkipGarbageCollectionOnShutdown()
Return true if triggering garbage collection should be skipped on shutdown.
|
boolean |
isSkipProfileReportingOnShutdown()
Return true if profile reporting should be skipped on shutdown.
|
void |
loadSettings(PropertiesWrapper p)
Load the settings from the properties file.
|
void |
setGarbageCollectionWait(int garbageCollectionWait)
Set the time in millis to wait after a System.gc() to collect profiling information.
|
void |
setMode(AutoTuneMode mode)
Set the mode used when autoTune has not been explicit defined on a query.
|
void |
setProfiling(boolean profiling)
Set to true if profiling information should be collected.
|
void |
setProfilingBase(int profilingBase)
Set the based number of queries to profile.
|
void |
setProfilingFile(String profilingFile)
Set the name of the file that profiling information is written to.
|
void |
setProfilingRate(double profilingRate)
Set the rate (%) of queries to be profiled after the 'base' amount of
profiling.
|
void |
setProfilingUpdateFrequency(int profilingUpdateFrequency)
Set the frequency in seconds the profiling should be collected and automatically applied to the tuning.
|
void |
setQueryTuning(boolean queryTuning)
Set to true if the queries should be tuned by autoTune.
|
void |
setQueryTuningAddVersion(boolean queryTuningAddVersion)
Set to true to force the version property to be always added by the query
tuning.
|
void |
setQueryTuningFile(String queryTuningFile)
Set the name of the file that holds the query tuning information.
|
void |
setSkipGarbageCollectionOnShutdown(boolean skipGarbageCollectionOnShutdown)
Set to true if triggering garbage collection should be skipped on shutdown.
|
void |
setSkipProfileReportingOnShutdown(boolean skipProfileReportingOnShutdown)
Set to true if profile reporting should be skipped on shutdown.
|
public AutoTuneConfig()
public boolean isActive()
public String getQueryTuningFile()
public void setQueryTuningFile(String queryTuningFile)
public String getProfilingFile()
public void setProfilingFile(String profilingFile)
public int getProfilingUpdateFrequency()
public void setProfilingUpdateFrequency(int profilingUpdateFrequency)
public AutoTuneMode getMode()
public void setMode(AutoTuneMode mode)
public boolean isQueryTuning()
public void setQueryTuning(boolean queryTuning)
public boolean isQueryTuningAddVersion()
If this is false then the version property will be added when profiling detects that the bean is possibly going to be modified.
public void setQueryTuningAddVersion(boolean queryTuningAddVersion)
If this is false then the version property will be added when profiling detects that the bean is possibly going to be modified.
Generally this is not expected to be turned on.
public boolean isProfiling()
public void setProfiling(boolean profiling)
The profiling information is collected and then used to generate the tuned queries for autoTune.
public int getProfilingBase()
public void setProfilingBase(int profilingBase)
public double getProfilingRate()
public void setProfilingRate(double profilingRate)
public int getGarbageCollectionWait()
The profiling information is collected on object finalise. As such we generally don't want to trigger GC (let the JVM do its thing) but on shutdown the autoTune manager will trigger System.gc() and then wait (default 100 millis) to hopefully collect profiling information - especially for short run unit tests.
public void setGarbageCollectionWait(int garbageCollectionWait)
public boolean isSkipGarbageCollectionOnShutdown()
public void setSkipGarbageCollectionOnShutdown(boolean skipGarbageCollectionOnShutdown)
public boolean isSkipProfileReportingOnShutdown()
public void setSkipProfileReportingOnShutdown(boolean skipProfileReportingOnShutdown)
public void loadSettings(PropertiesWrapper p)
Copyright © 2019. All rights reserved.