- 授权协议: GPL
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: http://imbugs.github.com/simperf/
- 软件文档: https://github.com/imbugs/simperf
- 官方下载: https://github.com/imbugs/simperf
软件介绍
Simperf 是一个简单的性能测试工具,它提供了一个多线程测试框架
Example:
1. 在代码里使用Simperf
Simperf perf = new Simperf(50, 2000, 1000,
new SimperfThreadFactory() {
public SimperfThread newThread() {
return new SimperfThread();
}
});
// 设置结果输出文件,默认 simperf-result.log
perf.getMonitorThread().setLogFile("simperf.log");
// 开始性能测试
perf.start();
2. 在命令行里使用Simperf
public class SimperfCommandTest {
public static void main(String[] args) {
SimperfCommand simCommand = new SimperfCommand(args);
Simperf perf = simCommand.create();
if (perf == null) {
// 参数解析失败时会返回null
System.exit(-1);
}
perf.start(new SimperfThreadFactory() {
public SimperfThread newThread() {
return new SimperfThread();
}
});
}
}
执行命令:
java SimperfCommandTest -t 10 -c 10 -i 1000 参数说明: usage: SimperfCommand options -c,--count [*] number of each thread requests count -i,--interval [ ] interval of print messages, default 1000 -j [ ] generate jtl report -l,--log [ ] log filename -m,--maxtps [ ] max tps -t,--thread [*] number of thread count
3. 在Junit4里使用Simperf
public class SimperfTestCaseTest extends SimperfTestCase {
private Random rand;
@Test
@Simperf(thread = 2, count = 5, interval = 1000)
public void testXxx() {
try {
Thread.sleep(1000);
} catch (Exception e) {
}
boolean result = rand.nextInt(10) > 1;
Assert.assertTrue("随机生成结果", result);
}
}
删除
[英] 维克托•迈尔-舍恩伯格(Viktor Mayer-Schönberger)著 / 袁杰 译 / 浙江人民出版社 / 2013-1 / 49.90元
《删除》讲述了遗忘的美德,为读者展现了大数据时代的取舍之道。 《删除》从大数据时代信息取舍的目的和方法分别诠释了“被遗忘的权利”。维克托首先回溯了人类追寻记忆的过程,之后提出数字技术与全球网络正在瓦解我们天生的遗忘能力。对此,他考察了促进遗忘终止4大驱动力——数字化,廉价的存储器,易于提取,全球性访问。之后,他提出了当前数字化记忆的两大威胁——信息权力与时间,并给出了应对威胁的6大对策——数......一起来看看 《删除》 这本书的介绍吧!
