Package com.google.appengine.tools.appstats.StatsProtos

Examples of com.google.appengine.tools.appstats.StatsProtos.RequestStatProto


    Map<String, RpcStats> statsByRpc = new HashMap<String, RpcStats>();

    BigDecimal totalCostMicropennies = new BigDecimal(0);
    for (int i = 0; i < records.size(); i++) {
      RequestStatProto requestStat = records.get(i);
      String pathKey = extractKey(requestStat);
      PathStats pathStats = statsByPath.get(pathKey);
      if (pathStats == null) {
        pathStats = new PathStats(pathKey);
        statsByPath.put(pathKey, pathStats);
      }
      if (pathStats.requestIds.size() >= 10) {
        if (pathStats.requestIds.get(pathStats.requestIds.size() - 1) != 0) {
          pathStats.requestIds.add(0);
        }
      } else {
        pathStats.requestIds.add(i + 1);
      }

      for (AggregateRpcStatsProto aggregateStat : requestStat.getRpcStatsList()) {
        String rpcKey = aggregateStat.getServiceCallName();
        long totalCalls = aggregateStat.getTotalAmountOfCalls();
        long costMicropennies = aggregateStat.getTotalCostOfCallsMicrodollars();
        totalCostMicropennies = totalCostMicropennies.add(new BigDecimal(costMicropennies));
        RpcStats rpcStats = statsByRpc.get(rpcKey);
View Full Code Here


    } else if (path.startsWith("/static/")) {

      serveStaticContent(req, resp);
    } else if (path.equals("/details")) {

      RequestStatProto data;
      try {
        long asTimeStamp = Long.parseLong(req.getParameter("time"));
        data = memcache.getFull(asTimeStamp);
      } catch (NumberFormatException e) {
        data = null;
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.appstats.StatsProtos.RequestStatProto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.