@Override
 // @ApiMethod(name = "stat.send", httpMethod = "post")
 public void sendStat(StatInfo statInfo) {
   ObjectifyService.begin();
   logger.info(statInfo.getDetail());
   statManager.updateSessionStat(statInfo);
 }
Beispiel #2
0
 public static Map<String, Object> getTrackingMap(String search) {
   Map<String, Object> events = new TreeMap<String, Object>();
   for (StatInfo info : StatInfo.list().values()) {
     Map<String, Object> infoMap = new LinkedHashMap<String, Object>();
     String key =
         info.getName().replace("T$", "Times.").replace("I$", "Items.").replace("B$", "Data.");
     if (search.equals("*") || key.indexOf(search) >= 0) {
       infoMap.put("hps", info.getHps());
       infoMap.put("hits", info.getHits());
       infoMap.put("fails", info.getFails());
       infoMap.put("sum", info.getSum());
       infoMap.put("min", info.getMin());
       infoMap.put("max", info.getMax());
       infoMap.put("avg", info.getAvg());
       events.put(key, infoMap);
     }
   }
   return events;
 }
Beispiel #3
0
 public static void reset() {
   StatInfo.clear();
 }