@ReadOperation
    @Operation(summary = "Get a report of CAS statistics on tickets. Expired tickets will be removed")
    public Map<String, Object> statistics() {
        val model = new HashMap<String, Object>();

        val diff = Duration.between(upTimeStartDate, ZonedDateTime.now(ZoneOffset.UTC));
        model.put("upTime", diff.toSeconds());

        val runtime = Runtime.getRuntime();
        model.put("totalMemory", FileUtils.byteCountToDisplaySize(runtime.totalMemory()));
        model.put("maxMemory", FileUtils.byteCountToDisplaySize(runtime.maxMemory()));
        model.put("freeMemory", FileUtils.byteCountToDisplaySize(runtime.freeMemory()));

        val validTickets = new AtomicInteger();
        val expiredTickets = new AtomicInteger();
        try (val stream = ticketRegistry.getObject().stream()) {
            stream.forEach(Unchecked.consumer(ticket -> {
                if (ticket.isExpired()) {
                    ticketRegistry.getObject().deleteTicket(ticket.getId());
                    expiredTickets.incrementAndGet();
                } else {
                    validTickets.incrementAndGet();
                }
            }));
        }
        
        model.put("expiredTickets", expiredTickets);
        model.put("validTickets", validTickets);
        return model;
    }
Gets availability times of the server.

@return the availability
support/cas-server-support-reports-core/src/main/java/org/apereo/cas/web/report/StatisticsEndpoint.java