All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.fix.aggregating.profiler.ProfilerReport Maven / Gradle / Ivy

There is a newer version: 1.6.6
Show newest version
package ru.fix.aggregating.profiler;

import java.util.List;
import java.util.Map;

public class ProfilerReport {

    private final Map indicators;
    private final List profilerCallReports;

    public ProfilerReport(Map indicators, List profilerCallReports) {
        this.indicators = indicators;
        this.profilerCallReports = profilerCallReports;
    }

    public Map getIndicators() {
        return indicators;
    }

    public List getProfilerCallReports() {
        return profilerCallReports;
    }

    @Override
    public String toString() {
        StringBuilder sumReport = new StringBuilder();
        sumReport.append("Indicators:\n");
        indicators.forEach((key, value) ->
                sumReport.append(key)
                        .append(" = ")
                        .append(value)
                        .append('\n')
        );
        sumReport.append("Profilers:\n");
        profilerCallReports.forEach(pr ->
                sumReport.append(pr.toString())
                        .append('\n')
        );
        return sumReport.toString();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy