Examples of TimeStatistic


Examples of javax.management.j2ee.statistics.TimeStatistic

    }


    @Test
    public void testInspectJ2eeStats() throws Exception {
        TimeStatistic ts = (TimeStatistic) ObjectInspector.get(new TestStats(), "aaa");
        assertNotNull("didn't resolve anything", ts);
        assertEquals("stat name", "aaa", ts.getName());
    }
View Full Code Here

Examples of javax.management.j2ee.statistics.TimeStatistic

      return mcfName;
   }

   public TimeStatistic getWaitTime()
   {
      TimeStatistic ts = (TimeStatistic) getStatistic("WaitTime");
      return ts;
   }
View Full Code Here

Examples of javax.management.j2ee.statistics.TimeStatistic

      return ts;
   }

   public TimeStatistic getUseTime()
   {
      TimeStatistic ts = (TimeStatistic) getStatistic("UseTime");
      return ts;
   }
View Full Code Here

Examples of javax.management.j2ee.statistics.TimeStatistic

                        CountStatistic cStat = (CountStatistic) statistic;
                        long count = cStat.getCount();
                        mbeanStat.add(new String[] { "Count",
                                Long.toString(count) });
                    } else if (statistic instanceof TimeStatistic) {
                        TimeStatistic tStat = (TimeStatistic) statistic;
                        long count = tStat.getCount();
                        mbeanStat.add(new String[] { "Count",
                                Long.toString(count) });
                        String maxTime = TimeUtils.formatDuration(tStat.getMaxTime());
                        mbeanStat.add(new String[] { "Max Time",
                                maxTime });
                        String minTime = TimeUtils.formatDuration(tStat.getMinTime());
                        mbeanStat.add(new String[] { "Min Time",
                                minTime });
                        long totalTime = tStat.getTotalTime();
                        mbeanStat.add(new String[] { "Total Time",
                                Long.toString(totalTime) });
                    } else if (statistic instanceof BoundedRangeStatistic) {
                        BoundedRangeStatistic brStat = (BoundedRangeStatistic) statistic;
                        long upperBound = brStat.getUpperBound();
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.TimeStatistic

    public ManagedEndpoint(InternalEndpoint endpoint, Map<String,?> properties) {
        this.endpoint = endpoint;
        this.properties = new HashMap<String,Object>(properties);
        this.inboundExchanges = new CountStatistic("inboundExchanges", "Number of exchanges received");
        this.inboundExchangeRate = new TimeStatistic("inboundExchangeRate", "Number of exchanges received per second");
        this.outboundExchanges = new CountStatistic("outboundExchanges", "Number of exchanges sent");
        this.outboundExchangeRate = new TimeStatistic("outboundExchangeRate", "Number of exchanges sent per second");
    }
View Full Code Here

Examples of org.apache.servicemix.nmr.management.stats.TimeStatistic

    /**
     * @see org.fusesource.commons.management.ManagementStrategy#createStatistic(java.lang.String, java.lang.Object, UpdateMode)
     */
    public Statistic createStatistic(String name, Object owner, UpdateMode updateMode) {
        return updateMode == UpdateMode.COUNTER
                ? new TimeStatistic(name, null)
                : updateMode == UpdateMode.VALUE
                ? new CountStatistic(name, null)
                : null;
    }
View Full Code Here

Examples of org.glassfish.j2ee.statistics.TimeStatistic

    final BoundedRangeStatistic bs = (BoundedRangeStatistic)stc;
    return ( s.append(bs.getUpperBound()).append(SEP).append(bs.getLowerBound()).toString() );
  }
  private String timeStatisticSpecificString() {
    final StringBuffer s = new StringBuffer();
    final TimeStatistic ts = (TimeStatistic)stc;
    return ( s.append(ts.getMaxTime()).append(SEP).append(ts.getMinTime()).append(SEP).append(ts.getTotalTime()).toString() );
  }
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics.TimeStatistic

      {
         final Set<String> methods = stats.keySet();
         for (final String method : methods)
         {
            // Get the underlying time stat for this method
            final TimeStatistic stat = stats.get(method);

            // Create a composite view of the stat's state
            final MapCompositeValueSupport cvs = new MapCompositeValueSupport(METHOD_STATS_TYPE);
            cvs.put(PROP_NAME_METHODSTATS_COUNT, SimpleValueSupport.wrap(stat.count));
            cvs.put(PROP_NAME_METHODSTATS_MAXTIME, SimpleValueSupport.wrap(stat.maxTime));
View Full Code Here

Examples of org.jboss.ejb3.statistics.InvocationStatistics.TimeStatistic

      {
         final Set<String> methods = stats.keySet();
         for (final String method : methods)
         {
            // Get the underlying time stat for this method
            final TimeStatistic stat = stats.get(method);

            // Create a composite view of the stat's state
            final MapCompositeValueSupport cvs = new MapCompositeValueSupport(METHOD_STATS_TYPE);
            cvs.put(PROP_NAME_METHODSTATS_COUNT, SimpleValueSupport.wrap(stat.getCount()));
            cvs.put(PROP_NAME_METHODSTATS_MAXTIME, SimpleValueSupport.wrap(stat.getMaxTime()));
            cvs.put(PROP_NAME_METHODSTATS_MINTIME, SimpleValueSupport.wrap(stat.getMinTime()));
            cvs.put(PROP_NAME_METHODSTATS_TOTALTIME, SimpleValueSupport.wrap(stat.getTotalTime()));

            // Add the stat to the method map
            methodMap.put(method, cvs);
         }
      }
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.