public static int getThreadUniqId() {
		InternalScriptContext grinder = getGrinderInstance();
		GrinderProperties properties = grinder.getProperties();
		if (properties != null) {
			int totalProcessCount = properties.getInt("grinder.processes", 1);
			int totalThreadCount = properties.getInt("grinder.threads", 1);
			int agentNumber = grinder.getAgentNumber();
			int processNumber = grinder.getProcessNumber();
			int threadNumber = grinder.getThreadNumber();
			// Calc the current thread's unique id
			return (agentNumber * totalProcessCount * totalThreadCount) + (processNumber * totalThreadCount) + threadNumber;
		}
		return 0;
	}
Get this thread unique id among all threads in the all agents.

@return unique id b/w from 0 to total thread count.
@since 3.2.3
ngrinder-runtime/src/main/java/net/grinder/util/GrinderUtils.java