Removed HTML cache for organizations and services metrics pages.
The combinatorial is too large: - 48 pages by item - 100 organizations + 300 services = 400 items - => ~20 000 pages - 200kB/page - => 4GB in memory - ==> no way. Metrics pages are so numerous than they have to build on demand.
This commit is contained in:
parent
fba9e6a7ab
commit
dc73cd79f5
8 changed files with 176 additions and 216 deletions
|
@ -66,9 +66,6 @@ public class MetricGenericPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Organization > Metrics > Summary");
|
logger.info("PAGE Organization > Metrics > Summary");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -91,9 +88,7 @@ public class MetricGenericPage extends HttpServlet
|
||||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||||
trail.add("Génériques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/generic.xhtml");
|
trail.add("Génériques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/generic.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -64,9 +64,6 @@ public class MetricSpecificPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Organization > Metrics > Specific");
|
logger.info("PAGE Organization > Metrics > Specific");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -89,9 +86,7 @@ public class MetricSpecificPage extends HttpServlet
|
||||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||||
trail.add("Spécifiques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/specific.xhtml");
|
trail.add("Spécifiques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/specific.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -66,9 +66,6 @@ public class MetricSummaryPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Organization > Metrics > Summary");
|
logger.info("PAGE Organization > Metrics > Summary");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -91,9 +88,7 @@ public class MetricSummaryPage extends HttpServlet
|
||||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/summary.xhtml");
|
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/summary.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -65,9 +65,6 @@ public class MetricWebPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Organization > Metrics > Web");
|
logger.info("PAGE Organization > Metrics > Web");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -90,9 +87,7 @@ public class MetricWebPage extends HttpServlet
|
||||||
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
trail.add("Métriques", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/");
|
||||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/web.xhtml");
|
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/metrics/web.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -67,9 +67,6 @@ public class MetricGenericPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Service > MetricGenericPage");
|
logger.info("PAGE Service > MetricGenericPage");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -98,9 +95,7 @@ public class MetricGenericPage extends HttpServlet
|
||||||
trail.add("Générique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
trail.add("Générique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||||
+ "/metrics/generic.xhtml");
|
+ "/metrics/generic.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -67,9 +67,6 @@ public class MetricSpecificPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Service > MetricGenericPage");
|
logger.info("PAGE Service > MetricGenericPage");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
Service service = StatoolInfosWeb.instance().getServiceFromPathinfo(request.getPathInfo() + "?" + request.getQueryString());
|
||||||
|
@ -98,9 +95,7 @@ public class MetricSpecificPage extends HttpServlet
|
||||||
trail.add("Spécifique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
trail.add("Spécifique", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||||
+ "/metrics/specific.xhtml");
|
+ "/metrics/specific.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -67,9 +67,6 @@ public class MetricSummaryPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Service > MetricSummaryPage");
|
logger.info("PAGE Service > MetricSummaryPage");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -98,9 +95,7 @@ public class MetricSummaryPage extends HttpServlet
|
||||||
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
trail.add("Résumé", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||||
+ "/metrics/summary.xhtml");
|
+ "/metrics/summary.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
|
@ -67,9 +67,6 @@ public class MetricWebPage extends HttpServlet
|
||||||
{
|
{
|
||||||
logger.info("PAGE Service > MetricGenericPage");
|
logger.info("PAGE Service > MetricGenericPage");
|
||||||
|
|
||||||
String html = StatoolInfosWeb.instance().getHtmlCache().get(request);
|
|
||||||
if (html == null)
|
|
||||||
{
|
|
||||||
// Get parameters.
|
// Get parameters.
|
||||||
// ===============
|
// ===============
|
||||||
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
ViewMenu viewMenu = ViewMenu.valueFrom(request.getParameter("view"));
|
||||||
|
@ -98,9 +95,7 @@ public class MetricWebPage extends HttpServlet
|
||||||
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
trail.add("Web", "/federation/organizations/" + organization.getTechnicalName() + "/services/" + service.getTechnicalName()
|
||||||
+ "/metrics/web.xhtml");
|
+ "/metrics/web.xhtml");
|
||||||
|
|
||||||
html = WebCharterView.build(headerView, contentView, trail);
|
String html = WebCharterView.build(headerView, contentView, trail);
|
||||||
StatoolInfosWeb.instance().getHtmlCache().put(request, html);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Display page.
|
// Display page.
|
||||||
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
response.setContentType("application/xhtml+xml; charset=UTF-8");
|
||||||
|
|
Loading…
Reference in a new issue