Package com.cloud.utils

Examples of com.cloud.utils.Profiler.start()


              s_logger.trace("lock " + name + " is acquired, lock count :" + lockCount);
            return true;
          }
         
          if(ownerThread != null) {
            profiler.start();
            try {
              wait(((long)timeoutSeconds)*1000L);
            } catch (InterruptedException e) {
              interrupted = true;
            }
View Full Code Here


        if (_answers != null) {
            return _answers;
        }

        Profiler profiler = new Profiler();
        profiler.start();
        if (s <= 0) {
            wait();
        } else {
            int ms = s * 1000;
            wait(ms);
View Full Code Here

        Thread[] pThreads = new Thread[numProducers];

        Producer[] producers = new Producer[numProducers];
        int numProduced = 0;
        Profiler p = new Profiler();
        p.start();
        for (int i = 0; i < numProducers; i++) {
            producers[i] = new Producer(maxVmId);
            pThreads[i] = new Thread(producers[i]);
            numProduced += i + 1;
            pThreads[i].start();
View Full Code Here

        List<Long> work = new ArrayList<Long>();
        for (long i = 100; i <= 100 + numVms; i++) {
            work.add(i);
        }
        Profiler profiler = new Profiler();
        profiler.start();
        _sgMgr.scheduleRulesetUpdateToHosts(work, false, null);
        profiler.stop();

        System.out.println("Done " + numVms + " in " + profiler.getDuration() + " ms");
    }
View Full Code Here

        if (_answers != null) {
            return _answers;
        }

        Profiler profiler = new Profiler();
        profiler.start();
        if (s <= 0) {
            wait();
        } else {
            int ms = s * 1000;
            wait(ms);
View Full Code Here

            s_logger.debug("Security Group Mgr v2: scheduling ruleset updates for " + affectedVms.size() + " vms " + " (unique=" + workItems.size() +
                "), current queue size=" + _workQueue.size());
        }

        Profiler p = new Profiler();
        p.start();
        int updated = 0;
        if (updateSeqno) {
            updated = _rulesetLogDao.createOrUpdate(workItems);
            if (updated < workItems.size()) {
                throw new CloudRuntimeException("Failed to create ruleset log entries");
View Full Code Here

                        }

                        _mshostDao.update(_mshostId, getCurrentRunId(), DateUtil.currentGMTTime());
                        profilerHeartbeatUpdate.stop();

                        profilerPeerScan.start();
                        if (s_logger.isTraceEnabled()) {
                            s_logger.trace("Cluster manager peer-scan, id:" + _mshostId);
                        }

                        if (!_peerScanInited) {
View Full Code Here

                        try {
                            switch (msg.getMessageType()) {
                                case nodeAdded:
                                    if (msg.getNodes() != null && msg.getNodes().size() > 0) {
                                        Profiler profiler = new Profiler();
                                        profiler.start();

                                        notifyNodeJoined(msg.getNodes());

                                        profiler.stop();
                                        if (profiler.getDuration() > 1000) {
View Full Code Here

                                    break;

                                case nodeRemoved:
                                    if (msg.getNodes() != null && msg.getNodes().size() > 0) {
                                        Profiler profiler = new Profiler();
                                        profiler.start();

                                        notifyNodeLeft(msg.getNodes());

                                        profiler.stop();
                                        if (profiler.getDuration() > 1000) {
View Full Code Here

    private void peerScan() throws ActiveFencingException {
        Date cutTime = DateUtil.currentGMTTime();

        Profiler profiler = new Profiler();
        profiler.start();

        Profiler profilerQueryActiveList = new Profiler();
        profilerQueryActiveList.start();
        List<ManagementServerHostVO> currentList = _mshostDao.getActiveList(new Date(cutTime.getTime() - HeartbeatThreshold.value()));
        profilerQueryActiveList.stop();
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.