- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://labs.carrotsearch.com/junit-benchmarks.html
- 软件文档: http://labs.carrotsearch.com/junit-benchmarks-tutorial.html
软件介绍
如果你希望用 JUnit 来测试一些性能问题,那么 JUnitBenchmark 可以帮到你,主要特性:
- 记录执行时间
- 监控垃圾收集
- 测试热身
示例测试:
package org.javabenchmark;
import com.carrotsearch.junitbenchmarks.AbstractBenchmark;
import com.carrotsearch.junitbenchmarks.BenchmarkOptions;
import javolution.text.TextBuilder;
import org.junit.Test;
/**
* Benchmark for String concatenation. Compares StringBUilder (JDK) and
* TextBuilder (Javolution).
*/
public class StringConcatenationBenchmark extends AbstractBenchmark {
public static final long LOOPS_COUNT = 10000000;
@Test
@BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 1)
public void stringBuilderBenchmark() {
StringBuilder builder = new StringBuilder();
for (long i = 0; i < LOOPS_COUNT; i++) {
builder.append('i').append(i);
}
System.out.println(builder.toString().length());
}
@Test
@BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 1)
public void textBuilderBenchmark() {
TextBuilder builder = new TextBuilder();
for (long i = 0; i < LOOPS_COUNT; i++) {
builder.append('i').append(i);
}
System.out.println(builder.toString().length());
}
}
来吧!带你玩转 Excel VBA
罗刚君、杨嘉恺 / 电子工业出版社 / 2013-7 / 85.00元
本书旨在普及Excel VBA 基础理论,以及通过VBA 的高级应用扩展Excel 的功能,提升读者的制表效率,解决工作中的疑难,同时亦可借此开发商业插件。 本书主要分为操作自动化引言篇、入门篇、进阶篇和疑难解答篇,覆盖从入门到提高的所有内容,以满足不同层次的读者需求。其中操作自动化引言篇简述了操作自动化的需求与方式,借此引出VBA 入门篇。VBA 入门篇包含第2 章到第13 章,主要介绍了......一起来看看 《来吧!带你玩转 Excel VBA》 这本书的介绍吧!
