Examples of Statistics


Examples of org.exoplatform.services.jcr.statistics.Statistics

    * {@inheritDoc}
    */
   public List<NodeData> getChildNodesData(NodeData parent, List<QPathEntryFilter> pattern) throws RepositoryException,
      IllegalStateException
   {
      Statistics s = ALL_STATISTICS.get(GET_CHILD_NODES_DATA_PATTERN_DESCR);
      try
      {
         s.begin();
         return wcs.getChildNodesData(parent, pattern);
      }
      finally
      {
         s.end();
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.statistics.Statistics

   /**
    * {@inheritDoc}
    */
   public List<PropertyData> getChildPropertiesData(NodeData parent) throws RepositoryException, IllegalStateException
   {
      Statistics s = ALL_STATISTICS.get(GET_CHILD_PROPERTIES_DATA_DESCR);
      try
      {
         s.begin();
         return wcs.getChildPropertiesData(parent);
      }
      finally
      {
         s.end();
      }
   }
View Full Code Here

Examples of org.geotools.math.Statistics

     *
     * @throws FactoryException If the math transform can't be created or used.
     */
    public Statistics getErrorStatistics() throws FactoryException {
        final MathTransform  mt     = getMathTransform();
        final Statistics     stats  = new Statistics();
        final DirectPosition buffer = new GeneralDirectPosition(getDimension());
        for (final Iterator <MappedPosition> it=getMappedPositions().iterator(); it.hasNext();) {
            final MappedPosition mp = (MappedPosition) it.next();
            /*
             * Transforms the source point using the math transform calculated by this class.
             * If the transform can't be applied, then we consider this failure as if it was
             * a factory error rather than a transformation error. This simplify the exception
             * declaration, but also has some sense on a conceptual point of view. We are
             * transforming the exact same points than the one used for creating the math
             * transform. If one of those points can't be transformed, then there is probably
             * something wrong with the transform we just created.
             */
            final double error;
            try {
                error = mp.getError(mt, buffer);
            } catch (TransformException e) {
                throw new FactoryException(Errors.format(ErrorKeys.CANT_TRANSFORM_VALID_POINTS), e);
            }
            stats.add(error);
        }
        return stats;
    }
View Full Code Here

Examples of org.hibernate.search.stat.Statistics

      // Resolve jmx domain to use for query mbeans
      String queryGroupName = getQueryGroupName(cacheName);
      jmxDomain = JmxUtil.buildJmxDomain(globalCfg, mbeanServer, queryGroupName);

      // Register statistics MBean, but only enable if Infinispan config says so
      Statistics stats = sf.getStatistics();
      stats.setStatisticsEnabled(cfg.jmxStatistics().enabled());
      try {
         ObjectName statsObjName = new ObjectName(
               jmxDomain + ":" + queryGroupName + ",component=Statistics");
         JmxUtil.registerMBean(new StatisticsInfo(stats), statsObjName, mbeanServer);
      } catch (Exception e) {
View Full Code Here

Examples of org.hibernate.stat.Statistics

    Item item = new Item( "Mouse", "Micro$oft mouse" );
    Distributor res = new Distributor();
    res.setName( "Bruce" );
    item.setDistributors( new HashSet<Distributor>() );
    item.getDistributors().add( res );
    Statistics stats = ( (HibernateEntityManagerFactory) factory ).getSessionFactory().getStatistics();
    stats.clear();
    stats.setStatisticsEnabled( true );

    EntityManager em = factory.createEntityManager();
    em.getTransaction().begin();

    em.persist( res );
    em.persist( item );
    assertTrue( em.contains( item ) );

    em.getTransaction().commit();
    em.close();

    assertEquals( 1, stats.getSecondLevelCachePutCount() );
    assertEquals( 0, stats.getSecondLevelCacheHitCount() );

    em = factory.createEntityManager();
    em.getTransaction().begin();
    Item second = em.find( Item.class, item.getName() );
    assertEquals( 1, second.getDistributors().size() );
    assertEquals( 1, stats.getSecondLevelCacheHitCount() );
    em.getTransaction().commit();
    em.close();

    em = factory.createEntityManager();
    em.getTransaction().begin();
    second = em.find( Item.class, item.getName() );
    assertEquals( 1, second.getDistributors().size() );
    assertEquals( 3, stats.getSecondLevelCacheHitCount() );
    for ( Distributor distro : second.getDistributors() ) {
      em.remove( distro );
    }
    em.remove( second );
    em.getTransaction().commit();
    em.close();

    stats.clear();
    stats.setStatisticsEnabled( false );
  }
View Full Code Here

Examples of org.jboss.dna.graph.query.QueryResults.Statistics

        // Create the canonical plan ...
        long start = System.nanoTime();
        PlanNode plan = planner.createPlan(context, query);
        long duration = System.nanoTime() - start;
        Statistics stats = new Statistics(duration);

        QueryResultColumns resultColumns = QueryResultColumns.empty();
        if (!context.getProblems().hasErrors()) {
            // Optimize the plan ...
            start = System.nanoTime();
            PlanNode optimizedPlan = optimizer.optimize(context, plan);
            duration = System.nanoTime() - start;
            stats = stats.withOptimizationTime(duration);

            // Find the query result columns ...
            start = System.nanoTime();
            resultColumns = determineQueryResultColumns(optimizedPlan, context.getHints());
            duration = System.nanoTime() - start;
            stats = stats.withOptimizationTime(duration);

            if (!context.getProblems().hasErrors()) {
                // Execute the plan ...
                try {
                    start = System.nanoTime();
                    return processor.execute(context, query, stats, optimizedPlan);
                } finally {
                    duration = System.nanoTime() - start;
                    stats = stats.withOptimizationTime(duration);
                }
            }
        }
        // There were problems somewhere ...
        return new org.jboss.dna.graph.query.process.QueryResults(resultColumns, stats, context.getProblems());
View Full Code Here

Examples of org.jclouds.cloudwatch.domain.Statistics

   public void testDescribeAlarmsForMetric() throws Exception {
      String metricName = "TestMetricName";
      String namespace = Namespaces.EC2;
      int period = 60;
      Statistics statistics = Statistics.SAMPLE_COUNT;
      Unit unit = Unit.SECONDS;
      CloudWatchApi cloudWatchApi = requestSendsResponse(
            alarmRequest(ImmutableMap.<String, String>builder()
                                     .put("Action", "DescribeAlarmsForMetric")
                                     .put("Dimensions.member.1.Name", "TestDimensionName1")
                                     .put("Dimensions.member.1.Value", "TestDimensionValue1")
                                     .put("Dimensions.member.2.Name", "TestDimensionName2")
                                     .put("Dimensions.member.2.Value", "TestDimensionValue2")
                                     .put("MetricName", metricName)
                                     .put("Namespace", namespace)
                                     .put("Period", Integer.toString(period))
                                     .put("Statistic", statistics.toString())
                                     .put("Unit", unit.toString())
                                     .put("Signature", "y%2BpU0Lp6AAO2QSrNld1VQY4DhKVHcyn44dIfnrmJhpg%3D")
                                     .build()),
            HttpResponse.builder()
                        .statusCode(200)
View Full Code Here

Examples of org.jipijapa.management.spi.Statistics

    }

    @Override
    public boolean hasChild(PathElement element) {
        try {
            Statistics statistics = getStatistics();
            // if element key matches, check if element value also matches
            if (statistics.getChildrenNames().contains(element.getKey())) {
                Statistics childStatistics = statistics.getChild(element.getKey());
                return childStatistics != null && childStatistics.getDynamicChildrenNames(entityManagerFactoryLookup, PathWrapper.path(puName)).contains(element.getValue());
            } else {
                return super.hasChild(element);
            }
        }
        catch( IllegalStateException e) {  // WFLY-2436 ignore unexpected exceptions (e.g. JIPI-27 may throw an IllegalStateException)
View Full Code Here

Examples of org.jquantlib.math.statistics.Statistics

        // the model simulates nSamples paths
        MCSimulation.addSamples(nSamples);

        // the sampleAccumulator method
        // gives access to all the methods of statisticsAccumulator
        final Statistics s = MCSimulation.sampleAccumulator();

        /* @Real */final double PLMean = s.mean();
        /* @Real */final double PLStDev = MCSimulation.sampleAccumulator()
        .standardDeviation();
        /* @Real */final double PLSkew = MCSimulation.sampleAccumulator().skewness();
        /* @Real */final double PLKurt = MCSimulation.sampleAccumulator().kurtosis();

View Full Code Here

Examples of org.modeshape.jcr.api.monitor.Statistics

                seconds[currentSecond++] = stats;
                if (currentSecond == MAX_SECONDS) {
                    // The we've finished filling the seconds, so reset the index
                    // and roll the seconds statistics into a new cumulative statistic for the last minute ...
                    currentSecond = 0;
                    Statistics cumulative = statisticsFor(seconds);
                    minutes[currentMinute++] = cumulative;
                    if (currentMinute == MAX_MINUTES) {
                        // The we've finished filling the minutes, so reset the index
                        // and roll the minutes statistics into a new cumulative statistic for the last hour ...
                        currentMinute = 0;
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.