WANG il y a 6 ans
Parent
commit
c2cd30b427

+ 1 - 1
src/main/java/cn/com/qmth/examcloud/web/actuator/ApiStatusEndpoint.java

@@ -143,7 +143,7 @@ public class ApiStatusEndpoint {
 		}
 
 		Map<String, Object> map = Maps.newHashMap();
-		map.put("list", list);
+		map.put("data", list);
 		map.put("dateTime", reportInfo.getDateTime());
 
 		String html = ResourceLoader.getResource("api-status.html");

+ 55 - 9
src/main/resources/api-status.html

@@ -5,20 +5,66 @@
 <title>API status</title>
 </head>
 <body>
-	<table border="1">
+	<table style="border: 1px solid blue;" border="1" cellspacing="0">
 		<caption>date: ${dateTime?string('yyyy-MM-dd HH:mm:ss')}</caption>
 		<tr>
-			<th>Month</th>
-			<th>Savings</th>
+			<th>mapping</th>
+			<th>description</th>
+			<th>count</th>
+			<th>meanRate</th>
+			<th>oneMinuteRate</th>
+			<th>fiveMinuteRate</th>
+			<th>fifteenMinuteRate</th>
+			<th>min</th>
+			<th>max</th>
+			<th>mean</th>
+			<th>p50</th>
+			<th>p75</th>
+			<th>p95</th>
+			<th>p98</th>
+			<th>p99</th>
+			<th>p999</th>
+			<th>exceptionCount</th>
+			<th>exceptionMeanRate</th>
+			<th>exceptionOneMinuteRate</th>
+			<th>exceptionFiveMinuteRate</th>
+			<th>exceptionFifteenMinuteRate</th>
+			<th>exceptionPercent</th>
+			<th>exceptionMeanPercent</th>
+			<th>exceptionOneMinutePercent</th>
+			<th>exceptionFiveMinutePercent</th>
+			<th>exceptionFifteenMinutePercent</th>
 		</tr>
+		<#list data as cur>
 		<tr>
-			<td>January</td>
-			<td>$100</td>
-		</tr>
-		<tr>
-			<td>February</td>
-			<td>$50</td>
+			<td>${cur.mapping}</td>
+			<td>${cur.description!}</td>
+			<td>${cur.count}</td>
+			<td>${cur.meanRate?string("#.##")}</td>
+			<td>${cur.oneMinuteRate?string("#.##")}</td>
+			<td>${cur.fiveMinuteRate?string("#.##")}</td>
+			<td>${cur.fifteenMinuteRate?string("#.##")}</td>
+			<td>${cur.min?string("#.##")}</td>
+			<td>${cur.max?string("#.##")}</td>
+			<td>${cur.mean?string("#.##")}</td>
+			<td>${cur.p50?string("#.##")}</td>
+			<td>${cur.p75?string("#.##")}</td>
+			<td>${cur.p95?string("#.##")}</td>
+			<td>${cur.p98?string("#.##")}</td>
+			<td>${cur.p99?string("#.##")}</td>
+			<td>${cur.p999?string("#.##")}</td>
+			<td>${cur.exceptionCount}</td>
+			<td>${cur.exceptionMeanRate?string("#.##")}</td>
+			<td>${cur.exceptionOneMinuteRate?string("#.##")}</td>
+			<td>${cur.exceptionFiveMinuteRate?string("#.##")}</td>
+			<td>${cur.exceptionFifteenMinuteRate?string("#.##")}</td>
+			<td>${cur.exceptionPercent?string("#.##")}</td>
+			<td>${cur.exceptionMeanPercent?string("#.##")}</td>
+			<td>${cur.exceptionOneMinutePercent?string("#.##")}</td>
+			<td>${cur.exceptionFiveMinutePercent?string("#.##")}</td>
+			<td>${cur.exceptionFifteenMinutePercent?string("#.##")}</td>
 		</tr>
+		</#list>
 	</table>
 </body>
 </html>