Package com.cloud.utils

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


        }

        if (removedNodeList.size() > 0) {
            queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeRemoved, removedNodeList));
        }
        profilerRemovedList.stop();

        List<ManagementServerHostVO> newNodeList = new ArrayList<ManagementServerHostVO>();
        for (ManagementServerHostVO mshost : currentList) {
            if (!_activePeers.containsKey(mshost.getId())) {
                _activePeers.put(mshost.getId(), mshost);
View Full Code Here


            boolean locked = false;
            try {
                Profiler p = new Profiler();
                p.start();
                locked = WorkLock.lock(timeoutSeconds);
                p.stop();
                System.out.println("Thread " + id + " waited " + p.getDuration() + " ms, locked=" + locked);
                if (locked) {
                    Thread.sleep(jobDuration * 1000);
                }
            } catch (InterruptedException e) {
View Full Code Here

                        try {
                            wait((timeoutSeconds) * 1000L);
                        } catch (InterruptedException e) {
                            interrupted = true;
                        }
                        profiler.stop();

                        remainingMilliSeconds -= profiler.getDuration();
                        if (remainingMilliSeconds < 0)
                            return false;

View Full Code Here

                throw new CloudRuntimeException("Failed to create ruleset log entries");
            }
        }
        int newJobs = _workQueue.submitWorkForVms(workItems);
        _mBean.logScheduledDetails(workItems);
        p.stop();
        if (s_logger.isDebugEnabled()){
            s_logger.debug("Security Group Mgr v2: done scheduling ruleset updates for " + workItems.size() + " vms: num new jobs=" +
                           newJobs + " num rows insert or updated=" + updated + " time taken=" + p.getDuration());
        }
    }
View Full Code Here

                pThreads[i].join();
            } catch (InterruptedException ie){
                ie.printStackTrace();
            }
        }
        p.stop();
        System.out.println("Num Vms= " + maxVmId + " Queue size = " + queue.size() + " time=" + p.getDuration() + " ms");
        assertEquals(maxVmId, queue.size());
    }
   
    public  void testNumJobsEqToNumVms3() {
View Full Code Here

            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");
    }
   
    @Ignore
View Full Code Here

            wait();
        } else {
            int ms = s * 1000;
            wait(ms);
        }
        profiler.stop();
       
        if(s_logger.isTraceEnabled()) {
          s_logger.trace("Synchronized command - sending completed, time: " + profiler.getDuration() + ", answer: " +
          (_answers != null ? _answers[0].toString() : "null"));
        }
View Full Code Here

            boolean locked = false;
            try {
                Profiler p = new Profiler();
                p.start();
                locked = _workLock.lock(timeoutSeconds);
                p.stop();
                System.out.println("Thread " + id + " waited " + p.getDuration() + " ms, locked=" + locked);
                if (locked) {
                    Thread.sleep(jobDuration*1000);
                }
            } catch (InterruptedException e) {
View Full Code Here

    pf.start();
    try {
      Thread.sleep(1000);
    } catch (InterruptedException e) {
    }
    pf.stop();
   
    s_logger.info("Duration : " + pf.getDuration());
   
    Assert.assertTrue(pf.getDuration() >= 1000);
   
View Full Code Here

                                } else {
                                    s_logger.trace("Not scheduling agent rebalancing task as the averages load " + load + " is less than the threshold " + _connectedAgentsThreshold);
                                }
                            }
                        }
                        profilerAgentLB.stop();
                    } finally {
                        profiler.stop();
                       
                        if(profiler.getDuration() >= _heartbeatInterval) {
                            if(s_logger.isDebugEnabled())
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.