hi nginx java_hi-nginx-java并发性能一窥

欲知hi-nginx-java的并发性能,用jmeter进行测试便知一二。

设定用户数为100000,循环次数为100,ramp-up perio为2:

请求地址为http://localhost/test.java。该地址对应的servlet如下:

复制代码

1    private static hi.route r = hi.route.get_instance();

2

3    public jdemo() {

4        jdemo.r.get("^/(hello|test)/?$", (hi.request req, hi.response res, Matcher m) -> {

5            this.do_hello(req, res);

6        });

7    }

8

9    public void handler(hi.request req, hi.response res) {

10        jdemo.r.run(req, res);

11    }

12

13    private void do_hello(hi.request req, hi.response res) {

14        res.set_content_type("text/plain;charset=UTF-8");

15        res.set_cookie("test-k", "test-v", "Max-Age=3; Path=/");

16        res.status = 200;

17        res.content = "hello,world";

18    }

复制代码

龙华大道1号 http://www.kinghill.cn/Dynamics/2106.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值