-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have recorded ZK application using JMeter 2.12, but the same when i tried to run, JMeter not able to get the full response of a request even i have correlated dtid of that particular request.
Anyone can help.
Thanks in advance.
I thing You want this:
package com.demo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.zkoss.zk.ui.Execution;
import org.zkoss.zk.ui.util.PerformanceMeter;
public class DemoPerformanceMeter implements PerformanceMeter {
private static final Logger LOGGER = LoggerFactory.getLogger(DemoPerformanceMeter .class);
private long timeStartAtClient;
private long timeStartAtServer;
private long timeCompleteAtServer;
private long timeRecieveAtClient;
private long timeCompleteAtClient;
@Override
public void requestCompleteAtClient(String requestId, Execution exec, long time) {
timeCompleteAtClient = time;
}
@Override
public void requestCompleteAtServer(String requestId, Execution exec, long time) {
timeCompleteAtServer = time;
Long serverExe = timeCompleteAtServer - timeStartAtServer;
Long clientExe = timeCompleteAtClient - timeRecieveAtClient;
Long networkExe = (timeCompleteAtServer - timeRecieveAtClient) + (timeStartAtServer - timeStartAtClient);
long totalExe = 0;
totalExe += serverExe != null ? serverExe : 0;
totalExe += clientExe != null ? clientExe : 0;
totalExe += networkExe != null ? networkExe : 0;
if (exec.getAttribute("command") != null) {
LOGGER.info("Command name:{} ",exec.getAttribute("command"));
}
LOGGER.info("Total browser execution time:{} milliseconds., Total server execution time:{} milliseconds., Total network execution time:{} milliseconds., Total execution time:{} milliseconds.", new Object[]{clientExe,serverExe,networkExe,totalExe});
}
@Override
public void requestReceiveAtClient(String requestId, Execution exec, long time) {
timeRecieveAtClient = time;
}
@Override
public void requestStartAtClient(String requestId, Execution exec, long time) {
timeStartAtClient = time;
}
@Override
public void requestStartAtServer(String requestId, Execution exec, long time) {
timeStartAtServer = time;
}
}
Hi Virat,
Thanks for your response.
You have given set of code, my doubt is, what is use of this code and where can i include this code in jmeter.
Asked: 2014-12-17 03:56:33 +0800
Seen: 14 times
Last updated: Dec 17 '14
How to stop combining commands in an ajax call ?
zk developmet is esay [closed]
Need help with scrolling horizontal tabs in Right-to-Left (Arabic)
Create tab dynamically, multitab application
Radio button value change on database value
How to implement, each user has its own session timeout time