processNumber一直是0

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

processNumber一直是0

huayuanzzb
我准备了一个10000行的数据文件,开3个agent,每个agent都模拟3000的Vuser, 10 processes * 300 threads,每个Vuser会去数据文件中按如下公式找到对应行处理:
    agentNumber = grinder.agentNumber
    processNumber = grinder.processNumber
    threadNumber = grinder.threadNumber
    totalProcessCount = grinder.getProperties().getInt("grinder.processes", 1)
    totalThreadCount = grinder.getProperties().getInt("grinder.threads", 1)

    lineNumber = (agentNumber * totalProcessCount * totalThreadCount) + \
      (processNumber * totalThreadCount) + threadNumber
问题是不管开多少个agent,process, 或者thread,processNumber的值一直是0

请问应该怎么解决? 我用的ngrinder版本是3.3
Reply | Threaded
Open this post in threaded view
|

Re: processNumber一直是0

米阳
我也用了你这段代码,我是放于  beforeThread 中,每个线程都会去取到一个值。我试是正常的。
不晓得你是放于哪里?