use of com.haulmont.cuba.web.ScreenProfilerImpl in project cuba by cuba-platform.
the class CubaUidlWriter method writePerformanceData.
@Override
protected void writePerformanceData(UI ui, Writer writer) throws IOException {
super.writePerformanceData(ui, writer);
ScreenProfilerImpl profiler = AppBeans.get(ScreenProfilerImpl.NAME);
String profilerMarker = profiler.getCurrentProfilerMarker(ui);
if (profilerMarker != null) {
profiler.setCurrentProfilerMarker(ui, null);
long lastRequestTimestamp = ui.getSession().getLastRequestTimestamp();
writer.write(String.format(", \"profilerMarker\": \"%s\", \"profilerEventTs\": \"%s\", \"profilerServerTime\": %s", profilerMarker, lastRequestTimestamp, System.currentTimeMillis() - lastRequestTimestamp));
}
}
Aggregations