Skip to content
Snippets Groups Projects
Commit 62e257b0 authored by Jürgen Walter's avatar Jürgen Walter
Browse files

fixed EntityMapping stuff of previous commit

parent 0ed9f981
No related branches found
No related tags found
No related merge requests found
......@@ -141,19 +141,14 @@ public class PerformanceMetricsQueryConnectorImpl extends AbstractOSGiQueryConne
private void addSessionResults(Entity entity, Map<ResourceIdentifier, Resource> resourceIds,
long firstTs) {
Probe probe = DomainFactory.eINSTANCE.createProbe();
probe.setMetricName("responseTime");
entity.getProbes().add(probe);
StatType statType = DomainFactory.eINSTANCE.createStatType();
statType.setTypeName("DEFAULT");
probe.getStatTypes().add(statType);
StatType statType = entity.getProbes().get(0).getStatTypes().get(0);
ContinuousSeriesResult result = DomainFactory.eINSTANCE.createContinuousSeriesResult();
result.setXAxisDescription("ms");
result.setYAxisDescription("% (between 0 and 1)");
String abc = "session"; // ent.getIdentifier();
ResourceIdentifier dqlId = ResourceIdentifier.createResourceIdentifier("", abc);
Resource res = new Resource("session");// resourceIds.get(dqlId);
// String abc = "session"; // ent.getIdentifier();
// ResourceIdentifier dqlId = ResourceIdentifier.createResourceIdentifier("", abc);
// Resource res = new Resource("session");// resourceIds.get(dqlId);
// resourceIds.put(dqlId, res);
for (Session session : SessionFilter.sessionTimes) {
SeriesResultElement resultElement = KiekerHelper.getSeriesResultElement(session.start, session.duration,
......@@ -163,40 +158,6 @@ public class PerformanceMetricsQueryConnectorImpl extends AbstractOSGiQueryConne
statType.setResult(result);
}
// private void runABC(EntityMapping response, Trace kiekerResults, long
// firstTs){
// Map<Resource, Trace> resources = kiekerResults.getResourceToTraceMap();
// Map<ResourceIdentifier, Resource> resourceIds =
// kiekerResults.getResourceIdentifierToResourceMap();
// Map<Component, Trace> services = kiekerResults.getComponentToTraceMap();
//
// ContinuousSeriesResult res =
// DomainFactory.eINSTANCE.createContinuousSeriesResult();
// res.setXAxisDescription("ms");
// res.setYAxisDescription("ms");
// if (services != null) {
// try {
// Component comp = new Component(
// KiekerHelper.getComponentString(ent.getIdentifier()));
// Trace tr = services.get(comp);
// if (tr != null && tr.getEvents().size() > 0) {
// EventRecord first = tr.getEvents().get(0);
// EventRecord last = tr.getEvents().get(tr.getEvents().size()-1);
// double traceTime = last.getTimestamp() + last.getRuntime() -
// (first.getTimestamp());
// res.getElements().add(KiekerHelper.getSeriesResultElement(
// er.getTimestamp(), er.getRuntime(), firstTs));
// res.setValid(true);
// }
//
// } catch (NumberFormatException exc) {
// res.setValid(false);
// }
// st.setResult(res);
// }
// }
//
public void reset() {
// Nothing to do here
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment