Examples of CtSph


Examples of com.taobao.common.stable.CtSph

    protected void tearDown() throws Exception {
        super.tearDown();
    }
    public void testSphD() {
        CtSph sph = new CtSph("sph8", 10, 150, ValveType.COUNT_AND_AVGELAPSED_VALVE_TYPE);
        this.assertNotNull(SphD.get("sph8"));
    }
View Full Code Here

Examples of com.taobao.common.stable.CtSph

    }
    public  void testcountValve () {
        // ������ֵ��Ч
        int taskCount = 25;
        CountDownLatch latch = new CountDownLatch(taskCount);
        CtSph sph = new CtSph(2, 200, ValveType.COUNT_VALVE_TYPE);
        SearchTask task = new SearchTask(sph);
        task.setCountDownLatch(latch);
        ExecutorService es = Executors.newFixedThreadPool(40);
        for (int i = 0;i < taskCount;i ++) {
            es.submit(task);
View Full Code Here

Examples of com.taobao.common.stable.CtSph

    public  void AvgRTValve () throws InterruptedException {
        // ������ֵ��Ч
        int taskCount = 1370;
        CountDownLatch latch = new CountDownLatch(taskCount);
        // ����500���̶߳���������140ms��ʱ
        CtSph sph = new CtSph(10, 150, ValveType.COUNT_AND_AVGELAPSED_VALVE_TYPE);
        SphDRuntime.put("search", sph);
        SearchTask task = new SearchTask(sph);
        task.setSleeps(new int[]{
                100,100,100,100,100,100,100,100,100,100,
                100,100,100,100,100,100,100,100,100,100,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.