public abstract class Reporter extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected AtomicLong |
failedCounts
记录失败请求的总数
|
protected long |
maxTimeConsuming
最小耗时,单位微秒
|
protected long |
minTimeConsuming
最大耗时,单位微秒
|
protected long |
startTimestamp |
protected AtomicLong |
successCounts |
protected AtomicLong |
timeConsuming
请求的时间之和,单位微秒
|
| 构造器和说明 |
|---|
Reporter() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Reporter |
console()
获取一个打印信息到控制台的报告器
|
void |
reportFailed(Throwable throwable) |
void |
reportStart(long timestamp,
Benchmark<?> benchmark) |
void |
reportSuccess(long timeout) |
abstract void |
statistics(Benchmark<?> benchmark) |
protected final AtomicLong successCounts
protected final AtomicLong failedCounts
protected final AtomicLong timeConsuming
protected volatile long maxTimeConsuming
protected volatile long minTimeConsuming
protected volatile long startTimestamp
public static Reporter console()
ConsoleReporterpublic void reportSuccess(long timeout)
public void reportFailed(Throwable throwable)
public void reportStart(long timestamp,
Benchmark<?> benchmark)
public abstract void statistics(Benchmark<?> benchmark)
Copyright © 2022. All rights reserved.