1 |
torben |
711 |
<%@ page language="java" contentType="text/html; charset=UTF-8" |
2 |
|
|
pageEncoding="UTF-8"%> |
3 |
|
|
<%@ page import="java.util.Date" %> |
4 |
|
|
<%@ 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"> |
6 |
|
|
<html> |
7 |
|
|
<head> |
8 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
9 |
|
|
<title>TrainInfoService statistics</title> |
10 |
|
|
<style type="text/css"> |
11 |
|
|
td {text-align: right} |
12 |
|
|
td.left {text-align: left} |
13 |
|
|
|
14 |
|
|
</style> |
15 |
|
|
</head> |
16 |
|
|
<body> |
17 |
|
|
<h2>TrainInfoService statistics</h2> |
18 |
|
|
|
19 |
|
|
<% |
20 |
|
|
Statistics stats = Statistics.getInstance(); |
21 |
|
|
double days = stats.getElapsedDays(); |
22 |
|
|
|
23 |
|
|
%> |
24 |
|
|
|
25 |
|
|
<table border="0"> |
26 |
|
|
<tr> |
27 |
|
|
<td class="left">Current time:</td> |
28 |
|
|
<td><%= new Date().toString() %></td> |
29 |
|
|
</tr> |
30 |
|
|
<tr> |
31 |
|
|
<td class="left">Last reset:</td> |
32 |
|
|
<td><%= stats.getLastReset().toString() %></td> |
33 |
|
|
</tr> |
34 |
|
|
<tr> |
35 |
|
|
<td class="left">Elapsed</td> |
36 |
|
|
<td><%= stats.getElapsedAsString() %></td> |
37 |
|
|
</tr> |
38 |
|
|
</table> |
39 |
|
|
|
40 |
|
|
<br> |
41 |
|
|
<table border="1" cellspacing="0"> |
42 |
|
|
<tr> |
43 |
|
|
<th>Label</th> |
44 |
|
|
<th>Total</th> |
45 |
|
|
<th>Avg pr day</th> |
46 |
|
|
</tr> |
47 |
|
|
<tr> |
48 |
|
|
<td class="left">Station Lookups</td> |
49 |
|
|
<td><%= stats.getStationTotals() %></td> |
50 |
|
|
<td><%= stats.getStationTotals()/days %></td> |
51 |
|
|
</tr> |
52 |
|
|
<tr> |
53 |
|
|
<td class="left">--by Location</td> |
54 |
|
|
<td><%=stats.getStationLookupsLocation() %></td> |
55 |
|
|
<td><%=stats.getStationLookupsLocation()/days %></td> |
56 |
|
|
</tr> |
57 |
|
|
<tr> |
58 |
|
|
<td class="left">--by Name</td> |
59 |
|
|
<td><%=stats.getStationLookupsName() %></td> |
60 |
|
|
<td><%=stats.getStationLookupsName()/days %></td> |
61 |
|
|
</tr> |
62 |
|
|
<tr> |
63 |
|
|
<td class="left">--by Favorites</td> |
64 |
|
|
<td><%=stats.getStationLookupsFavorites() %></td> |
65 |
|
|
<td><%=stats.getStationLookupsFavorites()/days %></td> |
66 |
|
|
</tr> |
67 |
|
|
<tr> |
68 |
|
|
<td class="left">Departure Lookups</td> |
69 |
|
|
<td><%=stats.getDepartureLookups() %></td> |
70 |
|
|
<td><%=stats.getDepartureLookups()/days %></td> |
71 |
|
|
</tr> |
72 |
|
|
<tr> |
73 |
|
|
<td class="left">--cache hits</td> |
74 |
|
|
<td><%=stats.getDepartureCacheHits() %></td> |
75 |
|
|
<td><%=stats.getDepartureCacheHits()/days %></td> |
76 |
|
|
</tr> |
77 |
|
|
<tr> |
78 |
|
|
<td class="left">Timetable Lookups</td> |
79 |
|
|
<td><%=stats.getTimetableLookups() %></td> |
80 |
|
|
<td><%=stats.getTimetableLookups()/days %></td> |
81 |
|
|
</tr> |
82 |
|
|
<tr> |
83 |
|
|
<td class="left">--cache hits</td> |
84 |
|
|
<td><%=stats.getTimetableCacheHits() %></td> |
85 |
|
|
<td><%=stats.getTimetableCacheHits()/days %></td> |
86 |
|
|
</tr> |
87 |
|
|
</table> |
88 |
|
|
|
89 |
|
|
</body> |
90 |
|
|
</html> |