Examples of IntSeries


Examples of com.vmware.vim.binding.vim.PerformanceManager.IntSeries

            Map<String, PerformanceSample[]> result = new HashMap<String, PerformanceSample[]>();
            if (metricBase != null && metricBase.length > 0) {
               for (EntityMetricBase perf : metricBase) {
                  EntityMetric stats = ((EntityMetric) perf);
                  if (stats.getValue() != null && stats.getSampleInfo() != null) {
                     IntSeries samples = (IntSeries) stats.getValue()[0];
                     if (samples != null) {
                        int numSamples = samples.getValue().length;
                        List<PerformanceSample> vals = new ArrayList<PerformanceSample>();
                        for (int i = 0; i < numSamples; i++) {
                           if (samples.getValue()[i] >= 0) {
                              PerformanceSample output = new PerformanceSample();
                              output.sample = samples.getValue()[i];
                              output.timestamp = stats.getSampleInfo()[i].getTimestamp();
                              ElementDescription desc = counters.map.get(samples.getId().getCounterId()).getUnitInfo();
                              output.unit = desc.getLabel();
                              vals.add(output);
                           }
                        }
                        if (vals.size() > 0) {
View Full Code Here

Examples of com.vmware.vim.binding.vim.PerformanceManager.IntSeries

                  EntityMetric stats = ((EntityMetric) perf);
                  if (stats.getValue() != null && stats.getSampleInfo() != null) {
                     MetricSeries[] samples = (MetricSeries[]) stats.getValue();
                     if (samples != null) {
                        for (int i = 0; i < samples.length; i++) {
                           IntSeries sample = (IntSeries) samples[i];
                           if (sample.getValue() != null) {
                              String id = sample.getId().getInstance();
                              PerformanceSample val = result.get(id);
                              if (val == null) {
                                 val = new PerformanceSample();
                                 val.sample = sample.getValue()[sample.getValue().length - 1];
                                 val.timestamp = stats.getSampleInfo()[stats.getSampleInfo().length - 1].getTimestamp();
                                 ElementDescription desc = counters.map.get(samples[i].getId().getCounterId()).getUnitInfo();
                                 val.unit = desc.getLabel();
                                 result.put(id, val);
                              } else {
                                 val.sample = val.sample + sample.getValue()[sample.getValue().length - 1];
                              }
                           }
                        }
                     }
                  }
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.