class MotanBenchmarkClient extends AbstractBenchmarkClient {

    static Properties properties = new Properties();
    /**
     * 并发的Runable线程，是否使用相同的client进行调用。
     * true：并发线程只使用一个client（bean实例）调用服务。
     * false: 每个并发线程使用不同的Client调用服务
     */
    private static BenchmarkService benchmarkService;
    private static boolean isMultiClient;


    public static void main(String[] args) {<FILL_FUNCTION_BODY>}

    private static void loadProperties() {
        try {
            properties.load(ClassLoader.getSystemResourceAsStream("benchmark.properties"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    public ClientRunnable getClientRunnable(String classname, String params, CyclicBarrier barrier,
            CountDownLatch latch, long startTime, long endTime) {
        BenchmarkService service;
        if (isMultiClient) {
            ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]{"classpath*:motan-benchmark-client.xml"});
            service = (BenchmarkService) applicationContext.getBean("motanBenchmarkReferer");
        } else {
            service = benchmarkService;
        }

        Class[] parameterTypes = new Class[]{BenchmarkService.class, String.class, CyclicBarrier.class,
                CountDownLatch.class, long.class, long.class};
        Object[] parameters = new Object[]{service, params, barrier, latch, startTime, endTime};

        ClientRunnable clientRunnable = null;
        try {
            clientRunnable = (ClientRunnable) Class.forName(classname).getConstructor(parameterTypes).newInstance(parameters);
        } catch (InstantiationException | NoSuchMethodException | ClassNotFoundException | IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.getTargetException();
        }

        return clientRunnable;
    }
}

        loadProperties();
        int concurrents = Integer.parseInt(properties.getProperty("concurrents"));
        int runtime = Integer.parseInt(properties.getProperty("runtime"));
        String classname = properties.getProperty("classname");
        String params = properties.getProperty("params");
        isMultiClient = Boolean.parseBoolean(properties.getProperty("isMultiClient"));
        if (args.length == 5) {
            concurrents = Integer.parseInt(args[0]);
            runtime = Integer.parseInt(args[1]);
            classname = args[2];
            params = args[3];
            isMultiClient = Boolean.parseBoolean(args[4]);
        }

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
                new String[]{"classpath*:motan-benchmark-client.xml"});
        benchmarkService = (BenchmarkService) applicationContext.getBean("motanBenchmarkReferer");

        new MotanBenchmarkClient().start(concurrents, runtime, classname, params);
    
<methods>public non-sealed void <init>() ,public abstract com.weibo.motan.benchmark.ClientRunnable getClientRunnable(java.lang.String, java.lang.String, java.util.concurrent.CyclicBarrier, java.util.concurrent.CountDownLatch, long, long) ,public void start(int, int, java.lang.String, java.lang.String) <variables>private static final int WARMUPTIME,private java.lang.String classname,private int concurrents,private java.text.SimpleDateFormat dateFormat,private java.lang.String params,private int runTime,private com.weibo.motan.benchmark.ClientStatistics statistics