环境
- 个人电脑*1
- cpu 2.7GHz 4core
- memery 4GB
- 系统ubuntu16个人桌面版
服务
nodejs写的一个hello world的http服务
代码如下
const http = require('http');
const server = http.createServer((req, res) => {
let now = ''+new Date().getTime()
res.write(now)
res.end();
//console.info(now)
});
server.on('clientError', (err, socket) => {
socket.end('HTTP/1.1 400 Bad Request');
});
server.listen(8000);
console.info('server started at port 8000!')
测试工具
apache jmeter
测试计划如下
Test Plan
Thead Group(16个线程)
Loop Controller(3000次循环)
Http Request(post http://localhost:8000)
测试结果
执行测试,生成报告的步骤省略
以下为测试报告
{
“Total” : {
“transaction” : “Total”,
“sampleCount” : 48000,
“errorCount” :