Examples of PerfMetricIntSeries


Examples of com.vmware.vim25.PerfMetricIntSeries

                            PerfSampleInfo[]  infos = ((PerfEntityMetric)values[i]).getSampleInfo();
                            sampleDuration = (infos[infos.length-1].getTimestamp().getTimeInMillis() - infos[0].getTimestamp().getTimeInMillis()) /1000;
                            PerfMetricSeries[] vals = ((PerfEntityMetric)values[i]).getValue();
                            for(int vi = 0; ((vals!= null) && (vi < vals.length)); ++vi){
                                if(vals[vi] instanceof PerfMetricIntSeries) {
                                    PerfMetricIntSeries val = (PerfMetricIntSeries)vals[vi];
                                    long[] perfValues = val.getValue();
                                    if (vals[vi].getId().getCounterId() == rxPerfCounterInfo.getKey()) {
                                        networkReadKBs = sampleDuration * perfValues[3]; //get the average RX rate multiplied by sampled duration
                                    }
                                    if (vals[vi].getId().getCounterId() == txPerfCounterInfo.getKey()) {
                                        networkWriteKBs = sampleDuration * perfValues[3];//get the average TX rate multiplied by sampled duration
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                            int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
                            sampleDuration = (endMs - beginMs) /1000;
                            List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
                            for(int vi = 0; ((vals!= null) && (vi < vals.size())); ++vi){
                                if(vals.get(vi) instanceof PerfMetricIntSeries) {
                                    PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
                                    List<Long> perfValues = val.getValue();
                                    if (vals.get(vi).getId().getCounterId() == rxPerfCounterInfo.getKey()) {
                                        networkReadKBs = sampleDuration * perfValues.get(3); //get the average RX rate multiplied by sampled duration
                                    }
                                    if (vals.get(vi).getId().getCounterId() == txPerfCounterInfo.getKey()) {
                                        networkWriteKBs = sampleDuration * perfValues.get(3);//get the average TX rate multiplied by sampled duration
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                                int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
                                sampleDuration = (endMs - beginMs) /1000;
                                List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
                                for(int vi = 0; ((vals!= null) && (vi < vals.size())); ++vi){
                                    if(vals.get(vi) instanceof PerfMetricIntSeries) {
                                        PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
                                        List<Long> perfValues = val.getValue();
                                        Long sumRate = 0L;
                                        for (int j = 0; j < infos.size(); j++) { // Size of the array matches the size as the PerfSampleInfo
                                            sumRate += perfValues.get(j);
                                        }
                                        Long averageRate = sumRate / infos.size();
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                            int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
                            sampleDuration = (endMs - beginMs) /1000;
                            List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
                            for(int vi = 0; ((vals!= null) && (vi < vals.size())); ++vi){
                                if(vals.get(vi) instanceof PerfMetricIntSeries) {
                                    PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
                                    List<Long> perfValues = val.getValue();
                                    if (vals.get(vi).getId().getCounterId() == rxPerfCounterInfo.getKey()) {
                                        networkReadKBs = sampleDuration * perfValues.get(3); //get the average RX rate multiplied by sampled duration
                                    }
                                    if (vals.get(vi).getId().getCounterId() == txPerfCounterInfo.getKey()) {
                                        networkWriteKBs = sampleDuration * perfValues.get(3);//get the average TX rate multiplied by sampled duration
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                                int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
                                sampleDuration = (endMs - beginMs) / 1000;
                                List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
                                for (int vi = 0; ((vals != null) && (vi < vals.size())); ++vi) {
                                    if (vals.get(vi) instanceof PerfMetricIntSeries) {
                                        PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
                                        List<Long> perfValues = val.getValue();
                                        Long sumRate = 0L;
                                        for (int j = 0; j < infos.size(); j++) { // Size of the array matches the size as the PerfSampleInfo
                                            sumRate += perfValues.get(j);
                                        }
                                        Long averageRate = sumRate / infos.size();
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                            PerfSampleInfo[]  infos = ((PerfEntityMetric)values[i]).getSampleInfo();
                            sampleDuration = (infos[infos.length-1].getTimestamp().getTimeInMillis() - infos[0].getTimestamp().getTimeInMillis()) /1000;
                            PerfMetricSeries[] vals = ((PerfEntityMetric)values[i]).getValue();
                            for(int vi = 0; ((vals!= null) && (vi < vals.length)); ++vi){
                                if(vals[vi] instanceof PerfMetricIntSeries) {
                                    PerfMetricIntSeries val = (PerfMetricIntSeries)vals[vi];
                                    long[] perfValues = val.getValue();
                                    if (vals[vi].getId().getCounterId() == rxPerfCounterInfo.getKey()) {
                                        networkReadKBs = sampleDuration * perfValues[3]; //get the average RX rate multiplied by sampled duration
                                    }
                                    if (vals[vi].getId().getCounterId() == txPerfCounterInfo.getKey()) {
                                        networkWriteKBs = sampleDuration * perfValues[3];//get the average TX rate multiplied by sampled duration
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                            PerfSampleInfo[]  infos = ((PerfEntityMetric)values[i]).getSampleInfo();
                            sampleDuration = (infos[infos.length-1].getTimestamp().getTimeInMillis() - infos[0].getTimestamp().getTimeInMillis()) /1000;
                            PerfMetricSeries[] vals = ((PerfEntityMetric)values[i]).getValue();
                            for(int vi = 0; ((vals!= null) && (vi < vals.length)); ++vi){
                                if(vals[vi] instanceof PerfMetricIntSeries) {
                                    PerfMetricIntSeries val = (PerfMetricIntSeries)vals[vi];
                                    long[] perfValues = val.getValue();
                                    if (vals[vi].getId().getCounterId() == rxPerfCounterInfo.getKey()) {
                                        networkReadKBs = sampleDuration * perfValues[3]; //get the average RX rate multiplied by sampled duration
                                    }
                                    if (vals[vi].getId().getCounterId() == txPerfCounterInfo.getKey()) {
                                        networkWriteKBs = sampleDuration * perfValues[3];//get the average TX rate multiplied by sampled duration
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

      System.out.println("Device instance ID:"
          + vals[j].getId().getInstance());
     
      if(vals[j] instanceof PerfMetricIntSeries)
      {
        PerfMetricIntSeries val = (PerfMetricIntSeries) vals[j];
        long[] longs = val.getValue();
        for(int k=0; k<longs.length; k++)
        {
          System.out.print(longs[k] + " ");
        }
        System.out.println("Total:"+longs.length);
      }
      else if(vals[j] instanceof PerfMetricSeriesCSV)
      { // it is not likely coming here...
        PerfMetricSeriesCSV val = (PerfMetricSeriesCSV) vals[j];
        System.out.println("CSV value:" + val.getValue());
      }
    }
  }
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

      System.out.println("Device instance ID:"
          + vals[j].getId().getInstance());
     
      if(vals[j] instanceof PerfMetricIntSeries)
      {
        PerfMetricIntSeries val = (PerfMetricIntSeries) vals[j];
        long[] longs = val.getValue();
        for(int k=0; k<longs.length; k++)
        {
          System.out.print(longs[k] + " ");
        }
        System.out.println("Total:"+longs.length);
      }
      else if(vals[j] instanceof PerfMetricSeriesCSV)
      { // it is not likely coming here...
        PerfMetricSeriesCSV val = (PerfMetricSeriesCSV) vals[j];
        System.out.println("CSV value:" + val.getValue());
      }
    }
  }
View Full Code Here

Examples of com.vmware.vim25.PerfMetricIntSeries

                                int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
                                sampleDuration = (endMs - beginMs) /1000;
                                List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
                                for(int vi = 0; ((vals!= null) && (vi < vals.size())); ++vi){
                                    if(vals.get(vi) instanceof PerfMetricIntSeries) {
                                        PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
                                        List<Long> perfValues = val.getValue();
                                        Long sumRate = 0L;
                                        for (int j = 0; j < infos.size(); j++) { // Size of the array matches the size as the PerfSampleInfo
                                            sumRate += perfValues.get(j);
                                        }
                                        Long averageRate = sumRate / infos.size();
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.