rename 'percentile' plots to 'cumulative distribution'
This commit is contained in:
@@ -11,7 +11,7 @@ import java.nio.file.Path;
|
|||||||
|
|
||||||
import org.lucares.collections.LongList;
|
import org.lucares.collections.LongList;
|
||||||
|
|
||||||
public class PercentileCustomAggregator implements CustomAggregator {
|
public class CumulativeDistributionCustomAggregator implements CustomAggregator {
|
||||||
|
|
||||||
private final static int POINTS = 500;
|
private final static int POINTS = 500;
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ public class PercentileCustomAggregator implements CustomAggregator {
|
|||||||
|
|
||||||
private final Path tmpDir;
|
private final Path tmpDir;
|
||||||
|
|
||||||
public PercentileCustomAggregator(final Path tmpDir) {
|
public CumulativeDistributionCustomAggregator(final Path tmpDir) {
|
||||||
this.tmpDir = tmpDir;
|
this.tmpDir = tmpDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5,22 +5,22 @@ import java.util.Collection;
|
|||||||
|
|
||||||
import org.lucares.recommind.logs.DataSeries;
|
import org.lucares.recommind.logs.DataSeries;
|
||||||
|
|
||||||
public class PercentileAggregate implements AggregateHandler {
|
public class CumulativeDistributionHandler implements AggregateHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CustomAggregator createCustomAggregator(final Path tmpDir, final long fromEpochMilli,
|
public CustomAggregator createCustomAggregator(final Path tmpDir, final long fromEpochMilli,
|
||||||
final long toEpochMilli) {
|
final long toEpochMilli) {
|
||||||
return new PercentileCustomAggregator(tmpDir);
|
return new CumulativeDistributionCustomAggregator(tmpDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PercentileAggregate() {
|
public CumulativeDistributionHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addGnuplotDefinitions(final StringBuilder result, final String separator,
|
public void addGnuplotDefinitions(final StringBuilder result, final String separator,
|
||||||
final Collection<DataSeries> dataSeries) {
|
final Collection<DataSeries> dataSeries) {
|
||||||
|
|
||||||
appendln(result, "set x2label \"Percentile\"");
|
appendln(result, "set x2label \"Cumulative Distribution\"");
|
||||||
appendln(result, "set format x2 \"%.0f%%\"");
|
appendln(result, "set format x2 \"%.0f%%\"");
|
||||||
appendln(result, "set x2tics 5");
|
appendln(result, "set x2tics 5");
|
||||||
appendln(result, "set x2range [\"0\":\"100\"]");
|
appendln(result, "set x2range [\"0\":\"100\"]");
|
||||||
@@ -3,7 +3,7 @@ package org.lucares.pdbui;
|
|||||||
import org.lucares.pdb.plot.api.AggregateHandler;
|
import org.lucares.pdb.plot.api.AggregateHandler;
|
||||||
import org.lucares.pdb.plot.api.NullAggregate;
|
import org.lucares.pdb.plot.api.NullAggregate;
|
||||||
import org.lucares.pdb.plot.api.ParallelRequestsAggregate;
|
import org.lucares.pdb.plot.api.ParallelRequestsAggregate;
|
||||||
import org.lucares.pdb.plot.api.PercentileAggregate;
|
import org.lucares.pdb.plot.api.CumulativeDistributionHandler;
|
||||||
import org.lucares.pdb.plot.api.PlotSettings;
|
import org.lucares.pdb.plot.api.PlotSettings;
|
||||||
import org.lucares.pdb.plot.api.TimeRangeUnitInternal;
|
import org.lucares.pdb.plot.api.TimeRangeUnitInternal;
|
||||||
import org.lucares.pdbui.domain.Aggregate;
|
import org.lucares.pdbui.domain.Aggregate;
|
||||||
@@ -57,8 +57,8 @@ class PlotSettingsTransformer {
|
|||||||
switch (aggregate) {
|
switch (aggregate) {
|
||||||
case NONE:
|
case NONE:
|
||||||
return new NullAggregate();
|
return new NullAggregate();
|
||||||
case PERCENTILES:
|
case CUM_DISTRIBUTION:
|
||||||
return new PercentileAggregate();
|
return new CumulativeDistributionHandler();
|
||||||
case PARALLEL:
|
case PARALLEL:
|
||||||
return new ParallelRequestsAggregate();
|
return new ParallelRequestsAggregate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
package org.lucares.pdbui.domain;
|
package org.lucares.pdbui.domain;
|
||||||
|
|
||||||
public enum Aggregate {
|
public enum Aggregate {
|
||||||
NONE, PERCENTILES, PARALLEL
|
NONE,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Empirical cumulative distribution functions
|
||||||
|
*
|
||||||
|
* @see https://serialmentor.com/dataviz/ecdf-qq.html
|
||||||
|
*/
|
||||||
|
CUM_DISTRIBUTION,
|
||||||
|
|
||||||
|
PARALLEL
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -777,10 +777,10 @@ Vue.component('search-bar', {
|
|||||||
|
|
||||||
|
|
||||||
<div class="group" id="group-show-aggregate">
|
<div class="group" id="group-show-aggregate">
|
||||||
<label for="show-aggregate">Aggregate:</label>
|
<label for="show-aggregate">X2-Axis:</label>
|
||||||
<select id="show-aggregate" v-model="searchBar.aggregate">
|
<select id="show-aggregate" v-model="searchBar.aggregate">
|
||||||
<option value="NONE">-</option>
|
<option value="NONE">-</option>
|
||||||
<option value="PERCENTILES">percentiles</option>
|
<option value="CUM_DISTRIBUTION" title="cumulative distribution, see https://serialmentor.com/dataviz/ecdf-qq.html">cum. distribution</option>
|
||||||
<option value="PARALLEL">parallel requests</option>
|
<option value="PARALLEL">parallel requests</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user