|
@@ -16,13 +16,17 @@ import cn.com.qmth.examcloud.web.support.ApiInfoHolder;
|
|
@Component
|
|
@Component
|
|
public class ApiStatusInfoCollector {
|
|
public class ApiStatusInfoCollector {
|
|
|
|
|
|
- public synchronized List<ApiStatusInfo> collect(ReportInfo reportInfo) {
|
|
|
|
|
|
+ private static String algorithm;
|
|
|
|
|
|
|
|
+ {
|
|
// 耗时直方图算法:U:uniform ; B:biased
|
|
// 耗时直方图算法:U:uniform ; B:biased
|
|
- String algorithm = PropertyHolder.getString("$API.statistic.histograms.algorithm", "B");
|
|
|
|
|
|
+ algorithm = PropertyHolder.getString("$API.statistic.histograms.algorithm", "B");
|
|
if (!(algorithm.equals("B") || algorithm.equals("U"))) {
|
|
if (!(algorithm.equals("B") || algorithm.equals("U"))) {
|
|
throw new RuntimeException("histograms algorithm must be 'U' or 'B'");
|
|
throw new RuntimeException("histograms algorithm must be 'U' or 'B'");
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public synchronized List<ApiStatusInfo> collect(ReportInfo reportInfo) {
|
|
|
|
|
|
List<HistogramInfo> histogramInfoList = reportInfo.getHistogramInfoList();
|
|
List<HistogramInfo> histogramInfoList = reportInfo.getHistogramInfoList();
|
|
List<MeterInfo> meterInfoList = reportInfo.getMeterInfoList();
|
|
List<MeterInfo> meterInfoList = reportInfo.getMeterInfoList();
|