Examples of InvocationStatistics


Examples of facebook4j.management.InvocationStatistics

    // Helper methods
    private void checkMethodStats(String path) {
        APIStatisticsMBean statistics = apiMonitor.getStatistics();
        Iterator<? extends InvocationStatistics> itr = statistics.getInvocationStatistics().iterator();
        InvocationStatistics methodStats = null;
        while (itr.hasNext()) {
            InvocationStatistics s = itr.next();

            if (s.getName().equals(path)) {
                methodStats = s;
                break;
            }
        }
View Full Code Here

Examples of org.fusesource.ide.jmx.commons.messages.InvocationStatistics

    }
    return null;
  }

  public IInvocationStatistics getTotalStatistics() {
    InvocationStatistics stats = new InvocationStatistics();
    appendStatistics(stats);
    return stats;
  }
View Full Code Here

Examples of org.fusesource.ide.jmx.commons.messages.InvocationStatistics

    NodeStatisticsContainer container = getNodeStatisticsContainer();
    if (container instanceof IProcessorStatisticsContainer) {
      IProcessorStatisticsContainer processorContainer = (IProcessorStatisticsContainer) container;
      Map<String, IProcessorStatistics> map = processorContainer.getNodeStatsMap();
      Collection<IProcessorStatistics> values = map.values();
      InvocationStatistics stats = new InvocationStatistics();
      for (IProcessorStatistics statistics : values) {
        stats.combineChild(statistics);
      }
      return stats;
    }
    return null;
  }
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics

      }
      // Real inflow invocation (ie. from MessageListener.onMessage())
      else
      {
         // Tell invoke stats we're starting
         final InvocationStatistics invokeStats = container.getInvokeStats();
         invokeStats.callIn();
         try
         {
            final long start = System.currentTimeMillis();
            returnValue = delivery(proxy, container, method, args);
            final long elapsed = System.currentTimeMillis() - start;
            invokeStats.updateStats(method, elapsed);
            if(log.isTraceEnabled())
            {
               log.trace("Invocation took " + elapsed + "ms: " + method);
            }
         }
         finally
         {
            // Tell invoke stats we're done
            invokeStats.callOut();
         }

      }

      // Return
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics

   @Test
   public void testStats() throws Exception
   {
      AuroraLocal bean = lookup("AuroraBean/local", AuroraLocal.class);

      InvocationStatistics stats = container.getInvokeStats();

      // Since we don't have a prince at hand, lets not sleep forever
      bean.sleep(100, MILLISECONDS);
     
      InvocationStatistics.TimeStatistic methodStat = stats.getStats().get("sleep");
      assertNotNull(methodStat);
      long count = methodStat.getCount();
      assertEquals(1, count);
      long maxTime = methodStat.getMaxTime();
      long minTime = methodStat.getMinTime();
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics

      }
      // Real inflow invocation (ie. from MessageListener.onMessage())
      else
      {
         // Tell invoke stats we're starting
         final InvocationStatistics invokeStats = container.getInvokeStats();
         invokeStats.callIn();
         try
         {
            final long start = System.currentTimeMillis();
            returnValue = delivery(proxy, container, method, args);
            final long elapsed = System.currentTimeMillis() - start;
            invokeStats.updateStats(method, elapsed);
            if(log.isTraceEnabled())
            {
               log.trace("Invocation took " + elapsed + "ms: " + method);
            }
         }
         finally
         {
            // Tell invoke stats we're done
            invokeStats.callOut();
         }

      }

      // Return
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics

            {
               // Cast
               final SessionContainer sessionContainer = (SessionContainer) container;

               // Get the invocation stats
               final InvocationStatistics stats = sessionContainer.getInvokeStats();
               if (stats == null)
               {
                  throw new IllegalStateException("Invocation statistics was null");
               }
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics

            {
               // Cast
               final SessionContainer sessionContainer = (SessionContainer) container;

               // Get the invocation stats
               final InvocationStatistics stats = sessionContainer.getInvokeStats();
               if (stats == null)
               {
                  throw new IllegalStateException("Invocation statistics was null");
               }
View Full Code Here

Examples of org.jboss.invocation.InvocationStatistics

      // InvocationStatistics holds refs to Methods from
      // application classes, so to avoid a classloader
      // leak, lets not just resetStats() but also replace
      // the object
      invokeStats.resetStats(); // in case someone else has a ref
      invokeStats = new InvocationStatistics();
      marshalledInvocationMapping.clear();
   }
View Full Code Here

Examples of org.jboss.invocation.InvocationStatistics

         CountStatisticImpl removeCount = (CountStatisticImpl) stats.getRemoveCount();
         Long removes = (Long) server.getAttribute(containerName, "RemoveCount");
         removeCount.set(removes.longValue());

         // Now build a TimeStatistics for every
         InvocationStatistics times = (InvocationStatistics) server.getAttribute(containerName, "InvokeStats");
         HashMap timesMap = new HashMap(times.getStats());
         Iterator iter = timesMap.entrySet().iterator();
         while (iter.hasNext())
         {
            Map.Entry entry = (Map.Entry) iter.next();
            Method m = (Method) entry.getKey();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.