作者:琼慧彦霖顺南 | 来源:互联网 | 2023-09-06 08:11
本文整理了Java中org.apache.jmeter.samplers.SampleResult.setErrorCount()
方法的一些代码示例,展示了SampleResult.setErrorCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SampleResult.setErrorCount()
方法的具体详情如下:
包路径:org.apache.jmeter.samplers.SampleResult
类名称:SampleResult
方法名:setErrorCount
SampleResult.setErrorCount介绍
暂无
代码示例
代码示例来源:origin: lucidworks/solr-scale-tk
exc.printStackTrace();
result.setSuccessful(false);
result.setErrorCount(1);
代码示例来源:origin: eclipse/hono
result.setSuccessful(errorCount == 0 && !senderClockNotInSync);
result.setSampleCount(messageCount);
result.setErrorCount(errorCount); // NOTE: This method does nothing in JMeter 3.3/4.0
result.setBytes(bytesReceived);
if (messageCount > 0) {
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
field = CSV_ERROR_COUNT;
text = parts[i++];
result.setErrorCount(Integer.parseInt(text));
代码示例来源:origin: opencb/opencga
logger.error("Error!", e);
result.setSuccessful(false);
result.setErrorCount(1);
代码示例来源:origin: eclipse/hono
sampleResult.setErrorCount(errorCount); // NOTE: This method does nothing in JMeter 3.3/4.0
final long averageElapsedTimePerMessage = addedSendDurations / messageCount;
sampleResult.setStampAndTime(sampleStart, averageElapsedTimePerMessage);
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_core
/**
* @param reader stream to read objects from
* @param context context for xstream to allow nested objects
* @param res sample result on which the attributes should be set
*/
protected void retrieveAttributes(HierarchicalStreamReader reader, UnmarshallingContext context, SampleResult res) {
res.setSampleLabel(ConversionHelp.decode(reader.getAttribute(ATT_LABEL)));
res.setDataEncoding(ConversionHelp.decode(reader.getAttribute(ATT_DATA_ENCODING)));
res.setDataType(ConversionHelp.decode(reader.getAttribute(ATT_DATA_TYPE)));
String oldrc=reader.getAttribute(ATT_RESPONSE_CODE_OLD);
if (oldrc!=null) {
res.setResponseCode(ConversionHelp.decode(oldrc));
} else {
res.setResponseCode(ConversionHelp.decode(reader.getAttribute(ATT_RESPONSE_CODE)));
}
res.setResponseMessage(ConversionHelp.decode(reader.getAttribute(ATT_RESPONSE_MESSAGE)));
res.setSuccessful(Converter.getBoolean(reader.getAttribute(ATT_SUCCESS), true));
res.setThreadName(ConversionHelp.decode(reader.getAttribute(ATT_THREADNAME)));
res.setStampAndTime(Converter.getLong(reader.getAttribute(ATT_TIME_STAMP)),
Converter.getLong(reader.getAttribute(ATT_TIME)));
res.setIdleTime(Converter.getLong(reader.getAttribute(ATT_IDLETIME)));
res.setLatency(Converter.getLong(reader.getAttribute(ATT_LATENCY)));
res.setConnectTime(Converter.getLong(reader.getAttribute(ATT_CONNECT_TIME)));
res.setBytes(Converter.getLong(reader.getAttribute(ATT_BYTES)));
res.setSentBytes(Converter.getLong(reader.getAttribute(ATT_SENT_BYTES)));
res.setSampleCount(Converter.getInt(reader.getAttribute(ATT_SAMPLE_COUNT),1)); // default is 1
res.setErrorCount(Converter.getInt(reader.getAttribute(ATT_ERROR_COUNT),0)); // default is 0
res.setGroupThreads(Converter.getInt(reader.getAttribute(ATT_GRP_THRDS)));
res.setAllThreads(Converter.getInt(reader.getAttribute(ATT_ALL_THRDS)));
}