Java 类com.vmware.vim25.PerfInterval 实例源码

项目:vijava    文件:PrintPerfMgr.java   
public static void main(String[] args) throws Exception
{
  if(args.length != 3)
  {
    System.out.println("Usage: java PrintPerfMgr " 
      + "<url> <username> <password>");
    return;
  }

  ServiceInstance si = new ServiceInstance(
    new URL(args[0]), args[1], args[2], true);

  PerformanceManager perfMgr = si.getPerformanceManager();

  System.out.println("***Print All Descriptions:");
  PerformanceDescription pd = perfMgr.getDescription();
  printPerfDescription(pd);

  System.out.println("\n***Print All Historical Intervals:");
  PerfInterval[] pis = perfMgr.getHistoricalInterval();
  printPerfIntervals(pis);

  System.out.println("\n***Print All Perf Counters:");
  PerfCounterInfo[] pcis = perfMgr.getPerfCounter();
  printPerfCounters(pcis);

  si.getServerConnection().logout();
}
项目:vijava    文件:PrintPerfMgr.java   
static void printPerfIntervals(PerfInterval[] pis)
{
  for(int i=0; pis!=null && i<pis.length; i++)
  {
    System.out.println("\nPerfInterval # " + i);
    StringBuffer sb = new StringBuffer();
    sb.append("Name:" + pis[i].getName());
    sb.append("\nKey:" + pis[i].getKey());
    sb.append("\nLevel:"+ pis[i].getLevel());
    sb.append("\nSamplingPeriod:" + pis[i].getSamplingPeriod());
    sb.append("\nLength:" + pis[i].getLength());
    sb.append("\nEnabled:" + pis[i].isEnabled());
    System.out.println(sb);
  }
}
项目:cloudstack    文件:PerfManagerMO.java   
public void createPerfInterval(PerfInterval interval) throws Exception {
    _context.getService().createPerfInterval(_mor, interval);
}
项目:cloudstack    文件:PerfManagerMO.java   
public void updatePerfInterval(PerfInterval interval) throws Exception {
    _context.getService().updatePerfInterval(_mor, interval);
}
项目:cloudstack    文件:PerfManagerMO.java   
public List<PerfInterval> getIntervalInfo() throws Exception {
    return _context.getVimClient().getDynamicProperty(_mor, "historicalInterval");
}
项目:jcloud-vsphere    文件:PerformanceManagerApi.java   
/**
 * @throws java.rmi.RemoteException
 * @throws com.vmware.vim25.RuntimeFault
 * @deprecated use UpdatePerfInterval instead
 */
@Deprecated
void createPerfInterval(PerfInterval intervalId) throws RuntimeFault, RemoteException;
项目:jcloud-vsphere    文件:PerformanceManagerApi.java   
List<PerfInterval> getHistoricalInterval();
项目:jcloud-vsphere    文件:PerformanceManagerApi.java   
void updatePerfInterval(PerfInterval interval) throws RuntimeFault, RemoteException;