Hello all,
I'm a very beginner with nodejs and in first i want to produce a benchmark
to explain to my boss why nodejs is so interesting ;-)
Unfortunatly, i'm very surprise by the result !!!!
*Java Servlet :*
*
*
*code :*
*
*
@WebServlet("/SmartCreaServlet" )
public class SmartCreaServlet extends HttpServlet
{
...
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException
{
long id=Long.valueOf(request.getParameter("id"));
response.getWriter().print(StaticServlet.creaCache.get(id)); //
StaticServlet.creaCache
: static Map<Long, String> (anyway)
}
}
*
*
*Jmeter result :*
*
*
C:\Users\xxx\Documents\dev\apache-jmeter-2.7\dev>jmeter -n -t servlet.jmx
Creating summariser <summary>
Created the tree successfully using servlet.jmx
Starting the test @ Thu Jun 28 16:09:42 CEST 2012 (1340892582740)
Waiting for possible shutdown message on port 4445
summary + 177000 in 16,9s = 10482,7/s Avg: 9 Min: 0 Max: 1027
Err: 0 (0,00%)
summary + 390690 in 30,1s = 12980,6/s Avg: 7 Min: 0 Max: 813
Err: 0 (0,00%)
summary = 567690 in 46,9s = 12108,1/s Avg: 8 Min: 0 Max: 1027
Err: 0 (0,00%)
summary + 408688 in 30,1s = 13581,3/s Avg: 7 Min: 0 Max: 378
Err: 0 (0,00%)
summary = 976378 in 76,9s = 12699,2/s Avg: 7 Min: 0 Max: 1027
Err: 0 (0,00%)
summary + 376741 in 35,9s = 10503,8/s Avg: 7 Min: 0 Max: 6840
Err: 0 (0,00%)
summary = 1353119 in 112,7s = 12007,1/s Avg: 7 Min: 0 Max: 6840
Err: 0 (0,00%)
summary + 322937 in 31,1s = 10384,5/s Avg: 9 Min: 0 Max: 7000
Err: 0 (0,00%)
summary = 1676056 in 136,9s = 12244,3/s Avg: 8 Min: 0 Max: 7000
Err: 0 (0,00%)
summary + 99 in 0,1s = 712,2/s Avg: 39 Min: 0 Max: 111 Err:
0 (0,00%)
summary = 1676155 in 136,9s = *12242,4*/s Avg: 8 Min: 0 Max: 7000
Err: 0 (0,00%)
Tidying up ... @ Thu Jun 28 16:12:00 CEST 2012 (1340892720030)
... end of run
*nodejs :*
*
*
*code :*
var app = require('express').createServer();
app.get('/', function(req, res)
{
res.send('test'+req.query["id"]);
});
app.listen(3000);
*Jmeter result :*
*
*
C:\Users\xxx\Documents\dev\apache-jmeter-2.7\dev>jmeter -n -t nodejs.jmx
Creating summariser <summary>
Created the tree successfully using nodejs.jmx
Starting the test @ Thu Jun 28 16:16:41 CEST 2012 (1340893001061)
Waiting for possible shutdown message on port 4445
summary + 1 in 0,0s = 35,7/s Avg: 28 Min: 28 Max: 28 Err:
0 (0,00%)
summary + 149697 in 30,0s = 4993,2/s Avg: 19 Min: 1 Max: 125
Err:0 (0,00%)
summary = 149698 in 30,0s = 4993,3/s Avg: 19 Min: 1 Max: 125
Err:0 (0,00%)
summary + 166917 in 30,0s = 5560,4/s Avg: 17 Min: 1 Max: 41
Err:0 (0,00%)
summary = 316615 in 60,0s = 5278,7/s Avg: 18 Min: 1 Max: 125
Err:0 (0,00%)
summary + 99 in 0,1s = 1571,4/s Avg: 35 Min: 28 Max: 43 Err:
0 (0,00%)
summary = 316714 in 60,0s = 5277,2/s Avg: 18 Min: 1 Max: 125
Err:0 (0,00%)
Tidying up ... @ Thu Jun 28 16:19:00 CEST 2012 (1340893140039)
... end of run
Test are made on the same computer. jmeter tes is a simple http request
with 100 users config. nodejs is v0.8.0.
Is there a big mistake in my nodejs code ?
Thanks for your help ;-)
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en