tclogparser.html
来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 1,079 行 · 第 1/4 页
HTML
1,079 行
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#checkMethod(java.lang.String)">checkMethod</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> text)</CODE>
<BR>
The method checks for POST and GET methods currently. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#checkParamFormat(java.lang.String)">checkParamFormat</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> text)</CODE>
<BR>
Checks the string to see if it contains "&" and "=". </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#checkURL(java.lang.String)">checkURL</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url)</CODE>
<BR>
Checks the string to make sure it has /path/file?</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#cleanURL(java.lang.String)">cleanURL</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> entry)</CODE>
<BR>
The method cleans the URL using the following algorithm.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#close()">close</A></B>()</CODE>
<BR>
close the any streams or readers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#convertStringToJMRequest(java.lang.String, org.apache.jmeter.testelement.TestElement)">convertStringToJMRequest</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> text,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el)</CODE>
<BR>
Convert a single line into XML</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#convertStringtoNVPair(java.lang.String)">convertStringtoNVPair</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> stringparams)</CODE>
<BR>
Parse the string parameters into NVPair[] array. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#decodeParameterValue()">decodeParameterValue</A></B>()</CODE>
<BR>
decode the parameter values is to true by default</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html" title="class or interface in java.io">File</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#openFile(java.lang.String)">openFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> filename)</CODE>
<BR>
Creates a new File object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parse(java.io.BufferedReader, org.apache.jmeter.testelement.TestElement, int)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedReader.html" title="class or interface in java.io">BufferedReader</A> breader,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el,
int parseCount)</CODE>
<BR>
The method is responsible for reading each line, and breaking out of the
while loop if a set number of lines is given.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parse(org.apache.jmeter.testelement.TestElement, int)">parse</A></B>(<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el,
int parseCount)</CODE>
<BR>
parse the entire file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parseAndConfigure(int, org.apache.jmeter.testelement.TestElement)">parseAndConfigure</A></B>(int count,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el)</CODE>
<BR>
parse a set number of lines from the access log. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parseLine(java.lang.String, org.apache.jmeter.testelement.TestElement)">parseLine</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> line,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el)</CODE>
<BR>
parseLine calls the other parse methods to parse the given text.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/NVPair.html" title="class in org.apache.jmeter.protocol.http.util.accesslog">NVPair</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parseOneParameter(java.lang.String)">parseOneParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> parameter)</CODE>
<BR>
Method expects name and value to be separated by an equal sign "=". </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Vector.html" title="class or interface in java.util">Vector</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#parseParameters(java.lang.String)">parseParameters</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> parameters)</CODE>
<BR>
Method uses StringTokenizer to convert the string into single pairs. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#setDecodeParameterValues(boolean)">setDecodeParameterValues</A></B>(boolean decodeparams)</CODE>
<BR>
by default decode is set to true. if the parameters shouldn't be
decoded, call the method with false</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#setFilter(org.apache.jmeter.protocol.http.util.accesslog.Filter)">setFilter</A></B>(<A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/Filter.html" title="interface in org.apache.jmeter.protocol.http.util.accesslog">Filter</A> filter)</CODE>
<BR>
Use the filter to include/exclude files in the access logs. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#setSourceFile(java.lang.String)">setSourceFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> source)</CODE>
<BR>
Sets the source file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#setUseParsedFile(boolean)">setUseParsedFile</A></B>(boolean file)</CODE>
<BR>
Calls this method to set whether or not to use the path in the log. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#stripFile(java.lang.String, org.apache.jmeter.testelement.TestElement)">stripFile</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url,
<A HREF="../../../../../../../org/apache/jmeter/testelement/TestElement.html" title="interface in org.apache.jmeter.testelement">TestElement</A> el)</CODE>
<BR>
Tokenize the URL into two tokens. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html" title="class or interface in java.util">StringTokenizer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../../org/apache/jmeter/protocol/http/util/accesslog/TCLogParser.html#tokenize(java.lang.String, java.lang.String)">tokenize</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> line,
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> delim)</CODE>
<BR>
Parses the line using java.util.StringTokenizer.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="log"><!-- --></A><H3>
log</H3>
<PRE>
protected static final org.apache.log.Logger <B>log</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="GET"><!-- --></A><H3>
GET</H3>
<PRE>
public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>GET</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#org.apache.jmeter.protocol.http.util.accesslog.TCLogParser.GET">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="POST"><!-- --></A><H3>
POST</H3>
<PRE>
public static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>POST</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../../constant-values.html#org.apache.jmeter.protocol.http.util.accesslog.TCLogParser.POST">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="RMETHOD"><!-- --></A><H3>
RMETHOD</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>RMETHOD</B></PRE>
<DL>
<DD>protected members *
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="URL_PATH"><!-- --></A><H3>
URL_PATH</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>URL_PATH</B></PRE>
<DL>
<DD>The path to the access log file
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="useFILE"><!-- --></A><H3>
useFILE</H3>
<PRE>
protected boolean <B>useFILE</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="SOURCE"><!-- --></A><H3>
SOURCE</H3>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?