Search in sources :

Example 1 with ApplicationScatterScanResult

use of com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult in project pinpoint by naver.

the class FilterMapWrapSerializer method serialize.

@Override
public void serialize(FilterMapWrap wrap, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {
    jgen.writeStartObject();
    jgen.writeObjectField("applicationMapData", wrap.getApplicationMap());
    jgen.writeNumberField("lastFetchedTimestamp", wrap.getLastFetchedTimestamp());
    if (wrap.getApplicationMap() instanceof ApplicationMapWithScatterScanResult) {
        final List<ApplicationScatterScanResult> applicationScatterScanResult = ((ApplicationMapWithScatterScanResult) wrap.getApplicationMap()).getApplicationScatterScanResultList();
        jgen.writeFieldName("applicationScatterScanResult");
        jgen.writeStartObject();
        for (ApplicationScatterScanResult scatterScanResult : applicationScatterScanResult) {
            Application application = scatterScanResult.getApplication();
            String name = application.getName() + Node.NODE_DELIMITER + application.getServiceType().toString();
            jgen.writeObjectField(name, scatterScanResult.getScatterScanResult());
        }
        jgen.writeEndObject();
    }
    if (wrap.getApplicationMap() instanceof ApplicationMapWithScatterData) {
        Map<Application, ScatterData> applicationScatterDataMap = ((ApplicationMapWithScatterData) wrap.getApplicationMap()).getApplicationScatterDataMap();
        jgen.writeFieldName("applicationScatterData");
        jgen.writeStartObject();
        for (Map.Entry<Application, ScatterData> entry : applicationScatterDataMap.entrySet()) {
            Application application = entry.getKey();
            String name = application.getName() + Node.NODE_DELIMITER + application.getServiceType().toString();
            jgen.writeFieldName(name);
            ScatterData scatterData = entry.getValue();
            jgen.writeStartObject();
            jgen.writeObjectField("from", scatterData.getFrom());
            jgen.writeObjectField("to", scatterData.getTo());
            jgen.writeObjectField("resultFrom", scatterData.getOldestAcceptedTime());
            jgen.writeObjectField("resultTo", scatterData.getLatestAcceptedTime());
            jgen.writeObjectField("scatter", scatterData);
            jgen.writeEndObject();
        }
        jgen.writeEndObject();
    }
    jgen.writeEndObject();
}
Also used : ApplicationMapWithScatterData(com.navercorp.pinpoint.web.applicationmap.ApplicationMapWithScatterData) ApplicationMapWithScatterScanResult(com.navercorp.pinpoint.web.applicationmap.ApplicationMapWithScatterScanResult) ApplicationScatterScanResult(com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult) Application(com.navercorp.pinpoint.web.vo.Application) Map(java.util.Map) ScatterData(com.navercorp.pinpoint.web.scatter.ScatterData) ApplicationMapWithScatterData(com.navercorp.pinpoint.web.applicationmap.ApplicationMapWithScatterData)

Example 2 with ApplicationScatterScanResult

use of com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult in project pinpoint by naver.

the class DotExtractor method getApplicationScatterScanResult.

public List<ApplicationScatterScanResult> getApplicationScatterScanResult() {
    List<ApplicationScatterScanResult> applicationScatterScanResult = new ArrayList<>();
    for (Map.Entry<Application, List<Dot>> entry : this.dotMap.entrySet()) {
        List<Dot> dotList = entry.getValue();
        Application application = entry.getKey();
        ScatterScanResult scatterScanResult = new ScatterScanResult(range.getFrom(), range.getTo(), dotList);
        applicationScatterScanResult.add(new ApplicationScatterScanResult(application, scatterScanResult));
    }
    return applicationScatterScanResult;
}
Also used : ArrayList(java.util.ArrayList) ApplicationScatterScanResult(com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult) Dot(com.navercorp.pinpoint.web.vo.scatter.Dot) ArrayList(java.util.ArrayList) List(java.util.List) ApplicationScatterScanResult(com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult) ScatterScanResult(com.navercorp.pinpoint.web.vo.scatter.ScatterScanResult) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

ApplicationScatterScanResult (com.navercorp.pinpoint.web.vo.scatter.ApplicationScatterScanResult)2 Map (java.util.Map)2 ApplicationMapWithScatterData (com.navercorp.pinpoint.web.applicationmap.ApplicationMapWithScatterData)1 ApplicationMapWithScatterScanResult (com.navercorp.pinpoint.web.applicationmap.ApplicationMapWithScatterScanResult)1 ScatterData (com.navercorp.pinpoint.web.scatter.ScatterData)1 Application (com.navercorp.pinpoint.web.vo.Application)1 Dot (com.navercorp.pinpoint.web.vo.scatter.Dot)1 ScatterScanResult (com.navercorp.pinpoint.web.vo.scatter.ScatterScanResult)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1