3 |
<%@ page import="java.util.Date" %> |
<%@ page import="java.util.Date" %> |
4 |
<%@ page import="dk.thoerup.traininfoservice.Statistics" %> |
<%@ page import="dk.thoerup.traininfoservice.Statistics" %> |
5 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
6 |
<html> |
|
7 |
|
<%@page import="java.text.NumberFormat"%><html> |
8 |
<head> |
<head> |
9 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
10 |
<title>TrainInfoService statistics</title> |
<title>TrainInfoService statistics</title> |
20 |
<% |
<% |
21 |
Statistics stats = Statistics.getInstance(); |
Statistics stats = Statistics.getInstance(); |
22 |
double days = stats.getElapsedDays(); |
double days = stats.getElapsedDays(); |
23 |
|
NumberFormat form = NumberFormat.getNumberInstance(); |
24 |
|
form.setMaximumFractionDigits(1); |
25 |
|
form.setMinimumFractionDigits(1); |
26 |
|
|
27 |
%> |
%> |
28 |
|
|
44 |
<br> |
<br> |
45 |
<table border="1" cellspacing="0"> |
<table border="1" cellspacing="0"> |
46 |
<tr> |
<tr> |
47 |
<th>Label</th> |
<th> Label </th> |
48 |
<th>Total</th> |
<th> Total </th> |
49 |
<th>Avg pr day</th> |
<th> Avg/day </th> |
50 |
</tr> |
</tr> |
51 |
<tr> |
<tr> |
52 |
<td class="left">Station Lookups</td> |
<td class="left">Station Lookups</td> |
53 |
<td><%= stats.getStationTotals() %></td> |
<td><%= stats.getStationTotals() %></td> |
54 |
<td><%= stats.getStationTotals()/days %></td> |
<td><%= form.format(stats.getStationTotals()/days) %></td> |
55 |
</tr> |
</tr> |
56 |
<tr> |
<tr> |
57 |
<td class="left">--by Location</td> |
<td class="left">--by Location</td> |
58 |
<td><%=stats.getStationLookupsLocation() %></td> |
<td><%= stats.getStationLookupsLocation() %></td> |
59 |
<td><%=stats.getStationLookupsLocation()/days %></td> |
<td><%= form.format(stats.getStationLookupsLocation()/days) %></td> |
60 |
</tr> |
</tr> |
61 |
<tr> |
<tr> |
62 |
<td class="left">--by Name</td> |
<td class="left">--by Name</td> |
63 |
<td><%=stats.getStationLookupsName() %></td> |
<td><%= stats.getStationLookupsName() %></td> |
64 |
<td><%=stats.getStationLookupsName()/days %></td> |
<td><%= form.format(stats.getStationLookupsName()/days) %></td> |
65 |
</tr> |
</tr> |
66 |
<tr> |
<tr> |
67 |
<td class="left">--by Favorites</td> |
<td class="left">--by Favorites</td> |
68 |
<td><%=stats.getStationLookupsFavorites() %></td> |
<td><%= stats.getStationLookupsFavorites() %></td> |
69 |
<td><%=stats.getStationLookupsFavorites()/days %></td> |
<td><%= form.format(stats.getStationLookupsFavorites()/days) %></td> |
70 |
</tr> |
</tr> |
71 |
<tr> |
<tr> |
72 |
<td class="left">Departure Lookups</td> |
<td class="left">Departure Lookups</td> |
73 |
<td><%=stats.getDepartureLookups() %></td> |
<td><%= stats.getDepartureLookups() %></td> |
74 |
<td><%=stats.getDepartureLookups()/days %></td> |
<td><%= form.format(stats.getDepartureLookups()/days) %></td> |
75 |
</tr> |
</tr> |
76 |
<tr> |
<tr> |
77 |
<td class="left">--cache hits</td> |
<td class="left">--cache hits</td> |
78 |
<td><%=stats.getDepartureCacheHits() %></td> |
<td><%= stats.getDepartureCacheHits() %></td> |
79 |
<td><%=stats.getDepartureCacheHits()/days %></td> |
<td><%= form.format(stats.getDepartureCacheHits()/days) %></td> |
80 |
</tr> |
</tr> |
81 |
<tr> |
<tr> |
82 |
<td class="left">Timetable Lookups</td> |
<td class="left">Timetable Lookups</td> |
83 |
<td><%=stats.getTimetableLookups() %></td> |
<td><%= stats.getTimetableLookups() %></td> |
84 |
<td><%=stats.getTimetableLookups()/days %></td> |
<td><%= form.format(stats.getTimetableLookups()/days) %></td> |
85 |
</tr> |
</tr> |
86 |
<tr> |
<tr> |
87 |
<td class="left">--cache hits</td> |
<td class="left">--cache hits</td> |
88 |
<td><%=stats.getTimetableCacheHits() %></td> |
<td><%= stats.getTimetableCacheHits() %></td> |
89 |
<td><%=stats.getTimetableCacheHits()/days %></td> |
<td><%= form.format(stats.getTimetableCacheHits()/days) %></td> |
90 |
</tr> |
</tr> |
91 |
</table> |
</table> |
92 |
|
|