Package com.taobao.common.stable

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


    }
    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

    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

Related Classes of com.taobao.common.stable.CtSph

Copyright © 2018 www.massapicom. 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.