report代码分析3--Report
来源:互联网 发布:select sql语句是 编辑:程序博客网 时间:2024/05/22 10:53
A bstract superclass for all reports所有报告的抽象父类
outline
public abstract class Report{}
public Report(){} //构造方法,若未设置className.output,则使用scenarioname_classname.txt作为文件名,并从相关setting中读取设置
private void checkDirExistence(String outFileName)
private boolean createDirs(File directory) //查看是否存在文件目录,若无,则新建
protected void init() //初始化报告输出。在每个报告文件开始都需要调用
{
this.lastReportTime = getSimTime();
if (outputInterval > 0) {
createSuffixedOutput(outFileName);
}
else {
createOutput(outFileName);
}
}
private void createOutput(String outFileName) //创建新的输出文件
private void createSuffixedOutput(String outFileName) //创建新的数字后缀(逐渐增加)的输出
protected void newEvent() //每一个新的报告事件生成前调用
{
if (this.outputInterval <= 0) {
return;
}
if (getSimTime() > this.lastReportTime + this.outputInterval) {
done(); // finalize the old file
init(); // init the new file
}
}
protected void write(String txt) //使用固定的格式输出
{
if (out == null) {
init();
}
out.println(prefix + txt); //protected PrintWriter out;
}
protected String format(double value) //格式化
{
return String.format("%." + precision + "f", value);
}
protected void setPrefix(String txt) //设置后缀
protected String getScenarioName() //返回场景名称
protected double getSimTime() //返回当前模拟时间
{
return SimClock.getTime();
}
0 0
- report代码分析3--Report
- report代码分析1--AdjacencyGraphvizReport
- oracle10g AWR Report 分析(3)
- report
- Report
- report
- Report
- report
- Report ><
- Report
- Report
- report包中的类及代码分析
- Jmeter Aggregate Report 与 Summary Report 分析
- statspack report分析
- statspack report分析(二)
- report分析---堆栈例子
- dfsadmin -report结果分析
- 分析Crash report
- Android ViewPager使用详解
- android studio Cause:failed to find target with hash string 'android - 17' in...
- JAVA学习8_@Override标签背后的小秘密
- HTML 5 会让iOS和Android开发者转行吗?
- 今年暑假不AC
- report代码分析3--Report
- Class-Specific Hough Forests for Object Detection
- Maven 配置tomcat和findbug插件(在eclipse建立的项目中)
- iOS开发之UIButton(自用贴)
- Sublime Text快捷键
- 更换ruby源----RubyGems 镜像 - 淘宝网
- Android setResult()的调用时机
- iOS推送&PHP后台
- Serializable