参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

taohuang
类似jmeter那样,如何快速获得请求计数,然后用于访问csv?是否有提供全局变量?
每次请求均增加一次计数存在到全局变量。

How to get the global request count, could I use a global variate ?
Reply | Threaded
Open this post in threaded view
|

Re: 参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

taohuang
This post was updated on .
void test(){

        grinder.logger.info("process number, thread number, run number, {}, {}, {}",
                grinder.processNumber, grinder.threadNumber, grinder.runNumber)
}
而且我发现grinder.processNumber在多进程设置下也是返回0

And I found that grinder.processNumber is always 0 even we set process number to 3





Reply | Threaded
Open this post in threaded view
|

Re: 参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

junoyoon
Administrator
In reply to this post by taohuang
no. ngrinder doesn't have global variable but you can define static member variable in test which acts as global variable within a process.
Reply | Threaded
Open this post in threaded view
|

Re: 参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

junoyoon
Administrator
In reply to this post by taohuang
ngrinder transfers only 1 process log(the other process logs are just ignored.). so if you see the log through ngrinder, you'll always see same process number.
Reply | Threaded
Open this post in threaded view
|

Re: 参数化,如何快速获取请求计数?How to get the global request count, could I use a global variate ?

taohuang
This post was updated on .
Thank you !