public class ApiAnalysis
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ApiAnalysis.ApiCall
Holds details of the ApiCall
|
Modifier and Type | Field and Description |
---|---|
boolean |
debug
debug
|
private static int |
DEFAULT_TOP_N |
java.lang.String |
endingText
ending text
|
boolean |
fullWondLog
Show full WOND log
|
java.lang.String |
inputFileName
input file name
|
static org.apache.commons.logging.Log |
log
logger
|
private static int |
MAX_CALLS_PER_API
This is used to remove calls in long-running threads like the cache update threads.
|
long |
maxTime
maximum time found for single query
|
java.lang.String |
outputFileName
output file name
|
java.lang.String |
startText
starting text
|
boolean |
todayOnly
todayOnly
|
int |
topN
topN statements
|
(package private) static java.lang.String |
usage |
Constructor and Description |
---|
ApiAnalysis() |
Modifier and Type | Method and Description |
---|---|
private void |
addWondResults(java.lang.StringBuffer wondResults,
ApiAnalysis.ApiCall api) |
boolean |
analyseApi()
Analyses the API call information collected in the specified input file
|
void |
apiAnalysis(java.lang.String[] args)
Analyse the API call logging in the specified file
|
java.lang.String |
getEndingText() |
java.lang.String |
getInputFileName() |
java.lang.String |
getOutputFileName() |
java.lang.String |
getStartText() |
int |
getTopN() |
boolean |
isFullWondLog() |
boolean |
isTodayOnly() |
static void |
main(java.lang.String[] args) |
private void |
saveWondSummary(java.util.List<ApiAnalysis.ApiCall> wondSummaryList,
ApiAnalysis.ApiCall newApi) |
void |
setEndingText(java.lang.String endingText) |
void |
setFullWondLog(boolean fullWondLog) |
void |
setInputFileName(java.lang.String inputFileName) |
void |
setOutputFileName(java.lang.String outputFileName) |
void |
setStartText(java.lang.String startText) |
void |
setTodayOnly(boolean todayOnly) |
void |
setTopN(int topN) |
private void |
writeResults(java.io.BufferedWriter bw,
java.util.Map<java.lang.String,ApiAnalysis.ApiCall> apiHash,
java.lang.String headingMean,
java.lang.String headingTotal) |
private void |
writeWondResults(java.io.BufferedWriter bw,
java.lang.StringBuffer strbuf) |
private void |
writeWondSummaryResults(java.io.BufferedWriter bw,
java.util.List<ApiAnalysis.ApiCall> wondSummaryList) |
public static org.apache.commons.logging.Log log
private static final int DEFAULT_TOP_N
static final java.lang.String usage
private static final int MAX_CALLS_PER_API
public java.lang.String startText
public java.lang.String endingText
public java.lang.String inputFileName
public java.lang.String outputFileName
public int topN
public long maxTime
public boolean debug
public boolean todayOnly
public boolean fullWondLog
public static void main(java.lang.String[] args)
args
- the argspublic void apiAnalysis(java.lang.String[] args)
args
- command line argumentspublic boolean analyseApi() throws KKAdminException, java.io.IOException
KKAdminException
- if the file could not be foundjava.io.IOException
- if the files could not be read or writtenprivate void saveWondSummary(java.util.List<ApiAnalysis.ApiCall> wondSummaryList, ApiAnalysis.ApiCall newApi)
private void addWondResults(java.lang.StringBuffer wondResults, ApiAnalysis.ApiCall api)
private void writeResults(java.io.BufferedWriter bw, java.util.Map<java.lang.String,ApiAnalysis.ApiCall> apiHash, java.lang.String headingMean, java.lang.String headingTotal) throws java.io.IOException
java.io.IOException
private void writeWondResults(java.io.BufferedWriter bw, java.lang.StringBuffer strbuf) throws java.io.IOException
java.io.IOException
private void writeWondSummaryResults(java.io.BufferedWriter bw, java.util.List<ApiAnalysis.ApiCall> wondSummaryList) throws java.io.IOException
java.io.IOException
public java.lang.String getInputFileName()
public void setInputFileName(java.lang.String inputFileName)
inputFileName
- the inputFileName to setpublic java.lang.String getOutputFileName()
public void setOutputFileName(java.lang.String outputFileName)
outputFileName
- the outputFileName to setpublic int getTopN()
public void setTopN(int topN)
topN
- the topN to setpublic java.lang.String getStartText()
public void setStartText(java.lang.String startText)
startText
- the startText to setpublic java.lang.String getEndingText()
public void setEndingText(java.lang.String endingText)
endingText
- the endingText to setpublic boolean isTodayOnly()
public void setTodayOnly(boolean todayOnly)
todayOnly
- the todayOnly to setpublic boolean isFullWondLog()
public void setFullWondLog(boolean fullWondLog)
fullWondLog
- the fullWondLog to setCopyright © 2018 DS Data Systems UK Ltd.