use of de.dagere.kopeme.generated.Result.Fulldata.Value in project peass by DaGeRe.
the class MeanCoVData method printResult.
protected void printResult(final Result result, final File csvFile) throws IOException {
try (BufferedWriter writer = new BufferedWriter(new FileWriter(csvFile))) {
DescriptiveStatistics statistics = new DescriptiveStatistics();
for (final Value value : result.getFulldata().getValue()) {
statistics.addValue(value.getValue());
if (statistics.getValues().length == avgCount) {
final double cov = statistics.getVariance() / statistics.getMean();
writer.write(statistics.getMean() + " " + cov + "\n");
// writer.write(FORMAT.format(statistics.getMean()) + ";" + FORMAT.format(cov) + "\n");
statistics = new DescriptiveStatistics();
}
}
writer.flush();
// System.out.println("set title 'Mean and Coefficient of Variation for " + clazzname + "." + testcase.getName() + "'");
// System.out.println("set y2range [0:5]");
// System.out.println("set y2tics");
// System.out.println("set datafile separator ';'");
// System.out.println("plot '" + csvFile.getName() + "' u ($0*" + AVG_COUNT + "):1 title 'Mean', '" + csvFile.getName() + "' u ($0*" + AVG_COUNT + "):2 title 'CoV' axes
// x1y2");
System.out.print(", '" + csvFile.getName() + "' u ($0*" + avgCount + "):1 title 'Mean'");
// System.out.println();
}
}
use of de.dagere.kopeme.generated.Result.Fulldata.Value in project peass by DaGeRe.
the class IsThereTimeReductionIterations method getMeasurements.
private List<double[]> getMeasurements(final List<Result> previusValues) {
final List<double[]> beforeMeasurements = new LinkedList<>();
for (final Result result : previusValues) {
final double[] vals = new double[result.getFulldata().getValue().size()];
int index = 0;
for (final Value value : result.getFulldata().getValue()) {
vals[index] = value.getValue();
index++;
}
beforeMeasurements.add(vals);
}
return beforeMeasurements;
}
use of de.dagere.kopeme.generated.Result.Fulldata.Value in project peass by DaGeRe.
the class MavenTestExecutorMocker method buildFulldata.
private static void buildFulldata(final int average, final Result result) {
final Fulldata values = new Fulldata();
for (long i = average - 10; i <= average + 10; i++) {
Value value = new Value();
value.setStart(i);
value.setValue(i);
values.getValue().add(value);
// values.put(i, i);
}
result.setFulldata(values);
}
use of de.dagere.kopeme.generated.Result.Fulldata.Value in project peass by DaGeRe.
the class MultipleVMTestUtil method createStatistics.
private static SummaryStatistics createStatistics(final Fulldata realData) {
final SummaryStatistics st2 = new SummaryStatistics();
final double[] values = new double[realData.getValue().size()];
int i = 0;
for (final Value value : realData.getValue()) {
final long parseDouble = value.getValue();
st2.addValue(parseDouble);
values[i++] = parseDouble;
}
return st2;
}
use of de.dagere.kopeme.generated.Result.Fulldata.Value in project peass by DaGeRe.
the class DummyKoPeMeDataCreator method initDummyFulldata.
private static void initDummyFulldata(final Result result, final int count) {
result.setFulldata(new Fulldata());
final Value value = new Value();
value.setValue(15);
if (count > TestResult.BOUNDARY_SAVE_FILE) {
try {
ResultTempWriter writer = new ResultTempWriter(false);
writeToDisk(count, writer);
result.getFulldata().setFileName(writer.getTempFile().getAbsolutePath());
} catch (IOException e) {
e.printStackTrace();
}
} else {
for (int i = 0; i < count; i++) {
result.getFulldata().getValue().add(value);
}
}
}
Aggregations