/[projects]/android/TrainInfoService/WebContent/statistics.jsp
ViewVC logotype

Diff of /android/TrainInfoService/WebContent/statistics.jsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 711 by torben, Wed May 5 20:11:03 2010 UTC revision 813 by torben, Wed Jun 9 21:04:54 2010 UTC
# Line 3  Line 3 
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>
# Line 19  Line 20 
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    
# Line 40  double days = stats.getElapsedDays(); Line 44  double days = stats.getElapsedDays();
44  <br>  <br>
45  <table border="1" cellspacing="0">  <table border="1" cellspacing="0">
46          <tr>          <tr>
47                  <th>Label</th>                  <th>&nbsp;Label&nbsp;</th>
48                  <th>Total</th>                  <th>&nbsp;Total&nbsp;</th>
49                  <th>Avg pr day</th>                  <th>&nbsp;Avg/day&nbsp;</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>
81            <tr>
82                    <td class="left">--failed</td>
83                    <td><%= stats.getDepartureErrors() %></td>
84                    <td><%= form.format(stats.getDepartureErrors()/days) %></td>
85          </tr>          </tr>
86          <tr>          <tr>
87                  <td class="left">Timetable Lookups</td>                  <td class="left">Timetable Lookups</td>
88                  <td><%=stats.getTimetableLookups() %></td>                  <td><%= stats.getTimetableLookups() %></td>
89                  <td><%=stats.getTimetableLookups()/days %></td>                  <td><%= form.format(stats.getTimetableLookups()/days) %></td>
90          </tr>          </tr>
91          <tr>          <tr>
92                  <td class="left">--cache hits</td>                  <td class="left">--cache hits</td>
93                  <td><%=stats.getTimetableCacheHits() %></td>                  <td><%= stats.getTimetableCacheHits() %></td>
94                  <td><%=stats.getTimetableCacheHits()/days %></td>                  <td><%= form.format(stats.getTimetableCacheHits()/days) %></td>
95          </tr>          </tr>
96            <tr>
97                    <td class="left">--failed</td>
98                    <td><%= stats.getTimetableErrors() %></td>
99                    <td><%= form.format(stats.getTimetableErrors()/days) %></td>
100            </tr>  
101  </table>  </table>
102    
103    <h2>Persistant statistics</h2>
104    <a href="DumpResultSet?dump=trainstatistics">Saved</a><br>
105    <a href="DumpResultSet?dump=trainstatistics_avg">Saved, average</a>
106  </body>  </body>
107  </html>  </html>

Legend:
Removed from v.711  
changed lines
  Added in v.813

  ViewVC Help
Powered by ViewVC 1.1.20