Package at.tuwien.minimee.model

Examples of at.tuwien.minimee.model.Machine


     */
    protected void collectData(ToolConfig config, long time, MigrationResult result){
       
        // overwrite this to collect additional performance data and
        // add it to the measurements of MigrationResult
        Machine m = ToolRegistry.getInstance().getMachine(machine);

        for (MeasurableProperty property: getMeasurableProperties()) {
            if (property.getName().startsWith("machine:")) {
                Measurement measurement = new Measurement();
                measurement.setProperty(property);
                FreeStringValue v =(FreeStringValue) property.getScale().createValue();
                if (property.getName().equals(Machine.MACHINE_NAME)) {
                    v.setValue(m.getId());
                } else if (property.getName().equals(Machine.MACHINE_OS)) {
                    v.setValue(m.getOperatingSystem());
                } else if (property.getName().equals(Machine.MACHINE_CPUS)) {
                    v.setValue(m.getCpus());
                } else if (property.getName().equals(Machine.MACHINE_CPUCLOCK)) {
                    v.setValue(m.getCpuClock());
                } else if (property.getName().equals(Machine.MACHINE_CPUTYPE)) {
                    v.setValue(m.getCpuType());
                } else if (property.getName().equals(Machine.MACHINE_MEMORY)) {
                    v.setValue(m.getMemory());
                }
                measurement.setValue(v);
                result.getMeasurements().put(property.getName(), measurement);
            }
        }       
View Full Code Here


     */
    protected void collectData(ToolConfig config, long time, MigrationResult result){
       
        // overwrite this to collect additional performance data and
        // add it to the measurements of MigrationResult
        Machine m = ToolRegistry.getInstance().getMachine(machine);

        for (Measure measure: getMeasures()) {
            if (measure.getUri().startsWith("machine:")) {
                Measurement measurement = new Measurement();
                measurement.setMeasureId(measure.getUri());
                FreeStringValue v =(FreeStringValue) measure.getScale().createValue();
                if (measure.getUri().equals(Machine.MACHINE_NAME)) {
                    v.setValue(m.getId());
                } else if (measure.getUri().equals(Machine.MACHINE_OS)) {
                    v.setValue(m.getOperatingSystem());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUS)) {
                    v.setValue(m.getCpus());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUCLOCK)) {
                    v.setValue(m.getCpuClock());
                } else if (measure.getUri().equals(Machine.MACHINE_CPUTYPE)) {
                    v.setValue(m.getCpuType());
                } else if (measure.getUri().equals(Machine.MACHINE_MEMORY)) {
                    v.setValue(m.getMemory());
                }
                measurement.setValue(v);
                result.getMeasurements().put(measure.getUri(), measurement);
            }
        }       
View Full Code Here

TOP

Related Classes of at.tuwien.minimee.model.Machine

Copyright © 2018 www.massapicom. 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.