Package eu.planets_project.pp.plato.model.measurement

Examples of eu.planets_project.pp.plato.model.measurement.Measurement


                "MEPP" // Normalized Mean Error AND Normalized Maximum Error
        };
       
        for (String metric: metrics) {
            Double value = evaluate(tempDir,file1,file2,metric);
            list.add(new Measurement("imagequality:"+metric,value));
       }
        return list;
    }
View Full Code Here


        ExecutionFootprintList performance = p.getList();
        //log.debug(performance.toString());
       
        for (MeasurableProperty property: getMeasurableProperties()) {
            if (!property.getName().startsWith("machine:")) {
                Measurement m = new Measurement();
                m.setProperty(property);
                PositiveFloatValue v = (PositiveFloatValue) property.getScale().createValue();

                if (property.getName().equals(MigrationResult.MIGRES_USED_TIME)) {
                    v.setValue(performance.getTotalCpuTimeUsed());
                }
                if (property.getName().equals(MigrationResult.MIGRES_MEMORY_GROSS)) {
                    v.setValue(performance.getMaxVirtualMemory());
                }
                if (property.getName().equals(MigrationResult.MIGRES_MEMORY_NET)) {
                    v.setValue(performance.getMaxResidentSize());
                }


                if (property.getName().equals("performance:averageResidentSize")) {
                    v.setValue(performance.getAverageResidentSize());
                } else if (property.getName().equals("performance:averageSharedMemory")) {
                    v.setValue(performance.getAverageSharedMemory());
                } else if (property.getName().equals("performance:averageVirtualMemory")) {
                    v.setValue(performance.getAverageVirtualMemory());
                } else if (property.getName().equals("performance:maxResidentSize")) {
                    v.setValue(performance.getMaxResidentSize());
                } else if (property.getName().equals("performance:maxSharedMemory")) {
                    v.setValue(performance.getMaxSharedMemory());
                } else if (property.getName().equals("performance:maxVirtualMemory")) {
                    v.setValue(performance.getMaxVirtualMemory());
                } else if (property.getName().equals("performance:totalCpuTimeUsed")) {
                    v.setValue(performance.getTotalCpuTimeUsed());
                }
                m.setValue(v);
                result.getMeasurements().put(property.getName(), m);
            }
        }
       
    }
View Full Code Here

    protected void collectData(ToolConfig config, long time, MigrationResult result) {
        super.collectData(config, time, result);
        double totalTime = new Jip_Parser().getTotalTime(makeJIPOutFilename(time)+".txt");
       
        for (MeasurableProperty property: getMeasurableProperties()) {
            Measurement m = new Measurement();
            m.setProperty(property);
            PositiveFloatValue v = (PositiveFloatValue) property.getScale().createValue();
            if (property.getName().equals("performance:totalTimeInJava")) {
                v.setValue(totalTime);
            }
//            if (property.getName().equals(MigrationResult.MIGRES_USED_TIME)) {
//                v.setValue(totalTime);
//            }

            m.setValue(v);
            result.getMeasurements().put(property.getName(), m);
        }
    }
View Full Code Here

//           
//            ExecutionFootprintList performance = p.getList();
//            //log.debug(performance.toString());
           
            for (MeasurableProperty property: getMeasurableProperties()) {
                Measurement m = new Measurement();
                m.setProperty(property);
                PositiveFloatValue v = (PositiveFloatValue) property.getScale().createValue();

                if (property.getName().equals("performance:memory:used")) {
                    v.setValue(123.12);
                }
//                if (property.getName().equals(MigrationResult.MIGRES_USED_TIME)) {
//                    v.setValue(performance.getTotalCpuTimeUsed());
//                }
//                if (property.getName().equals(MigrationResult.MIGRES_MEMORY_GROSS)) {
//                    v.setValue(performance.getMaxVirtualMemory());
//                }
//                if (property.getName().equals(MigrationResult.MIGRES_MEMORY_NET)) {
//                    v.setValue(performance.getMaxResidentSize());
//                }
        
                m.setValue(v);
                result.getMeasurements().put(property.getName(), m);
            }
           
        }
View Full Code Here

       
        String dbg = "real:" + p.getReal()+",user:"+p.getUser()+",sys:"+p.getSys();
        PlatoLogger.getLogger(this.getClass()).debug("TIME measured: " + dbg);
       
        for (MeasurableProperty property: getMeasurableProperties()) {
            Measurement m = new Measurement();
            m.setProperty(property);
            PositiveFloatValue v = (PositiveFloatValue) property.getScale().createValue();
           
            if (property.getName().equals(MigrationResult.MIGRES_USED_TIME)) {
                v.setValue((p.getUser()+p.getSys())*1000);
            }
           
            m.setValue(v);
            result.getMeasurements().put(property.getName(), m);
        }
    }   
View Full Code Here

            return 1.0;
        double score = 0.0;
        for (String config : benchmarkConfigs.keySet()) {
            ToolExperience ex = eb.getToolExperience(config);
           
                Measurement m = ex.getAverage(MigrationResult.MIGRES_ELAPSED_TIME_PER_MB);
                if (m != null) {
                        INumericValue v =  (INumericValue) m.getValue();
                        score += v.value();
                }
        }
        return score/benchmarkConfigs.size()/4000;
    }
View Full Code Here

                    if (sessionID == null) {
                        sessionID = ((IEmulationAction)action).startSession(a.getAction(), objectToView);
                    }
                    a.getExperiment().getDetailedInfo().get(sample).setSuccessful(true);
                    // we cannot use SETTINGS here because settings are not PER SAMPLE OBJECT!
                    info.getMeasurements().put("sessionid", new Measurement("sessionID",sessionID));
                } catch (PlatoServiceException e) {
                    String errorMsg = "Could not start emulation service." + e.getMessage();
                    setUniformProgramOutput(a, errorMsg, false);
                    FacesMessages.instance().add(FacesMessage.SEVERITY_ERROR,
                            "Could not start emulation service." + e.getMessage());
View Full Code Here

TOP

Related Classes of eu.planets_project.pp.plato.model.measurement.Measurement

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.