Package com.google.apphosting.api

Examples of com.google.apphosting.api.ApiStats


    stats.setRequestDataSummary(settings.getPayloadRenderer().renderPayload(
        intermediary.getPackageName(), intermediary.getMethodName(), request, true));
    stats.setStartOffsetMilliseconds(clock.currentTimeMillis());
    createStackTrace(2, stats, settings.getMaxLinesOfStackTrace());

    ApiStats apiStats = getApiStats(environment);
    intermediary.setApiMcyclesOrNull((apiStats == null) ? null : apiStats.getApiTimeInMegaCycles());
    intermediary.setApiStats(apiStats);
    intermediary.addOverhead(stats.getStartOffsetMilliseconds() - preNow);
  }
View Full Code Here


    long init = 0;
    IRPCCallProcessor proc = getProcessor(arg1);
    try {

      try {
        ApiStats apiStats = ApiStats.get(ApiProxy
            .getCurrentEnvironment());
        if (apiStats != null) {
          init = apiStats.getApiTimeInMegaCycles();
        }

      } catch (Throwable e) {
        e.printStackTrace();
      }

      if (proc != null) {
        proc.preCall(arg2, arg3);
      }
      byte[] makeSyncCall = delegate.makeSyncCall(arg0, arg1, arg2, arg3);
      if (proc != null) {
        proc.postCall(arg2, makeSyncCall);
      }
      return makeSyncCall;
    } catch (Throwable e) {
      e.printStackTrace();
      return null;
    } finally {
      try {
        ApiStats apiStats = ApiStats.get(ApiProxy
            .getCurrentEnvironment());
        if (apiStats != null) {
          long tl = apiStats.getApiTimeInMegaCycles();
          int delta = (int) (tl - init);
          if (proc != null) {
            proc.stat(delta);
          }
          Profiler.incCPU(delta);
View Full Code Here

    long init = 0;
    IRPCCallProcessor proc = getProcessor(arg1);
    try {

      try {
        ApiStats apiStats = ApiStats.get(ApiProxy
            .getCurrentEnvironment());
        if (apiStats != null) {
          init = apiStats.getApiTimeInMegaCycles();
        }

      } catch (Throwable e) {
        e.printStackTrace();
      }

      if (proc != null) {
        proc.preCall(arg2, arg3);
      }
      Future<byte[]> makeAsyncCall = delegate.makeAsyncCall(arg0, arg1,
          arg2, arg3, arg4);
      if (proc != null) {
        proc.postCall(arg2, makeAsyncCall.get());
      }
      return makeAsyncCall;
    } catch (Throwable e) {
      e.printStackTrace();
      return null;
    } finally {
      try {
        ApiStats apiStats = ApiStats.get(ApiProxy
            .getCurrentEnvironment());
        if (apiStats != null) {
          long tl = apiStats.getApiTimeInMegaCycles();
          int delta = (int) (tl - init);
          if (proc != null) {
            proc.stat(delta);
          }
          Profiler.incCPU(delta);
View Full Code Here

TOP

Related Classes of com.google.apphosting.api.ApiStats

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.