Package org.apache.jackrabbit.stats

Examples of org.apache.jackrabbit.stats.RepositoryStatisticsImpl


     * Create a new instance of this class registering all repository wide
     * statistics with the passed {@code whiteboard}.
     * @param whiteboard   whiteboard for registering the individual statistics with
     */
    public StatisticManager(Whiteboard whiteboard, ScheduledExecutorService executor) {
        repoStats = new RepositoryStatisticsImpl(executor);
        registration = new CompositeRegistration(
            registerMBean(whiteboard, QueryStatManagerMBean.class, new QueryStatManager(queryStat),
                    "QueryStats", "Oak Query Statistics"),
            registerMBean(whiteboard, RepositoryStatsMBean.class, new RepositoryStats(repoStats),
                    RepositoryStats.TYPE, "Oak Repository Statistics"));
View Full Code Here


     * @param repository repository instance
     */
    RepositoryContext(RepositoryImpl repository) {
        assert repository != null;
        this.repository = repository;
        this.statistics = new RepositoryStatisticsImpl(executor);
        this.statManager = new StatManager();
    }
View Full Code Here

     * @param context component context of this session
     */
    public SessionState(SessionContext context) {
        this.context = context;

        RepositoryStatisticsImpl statistics =
                context.getRepositoryContext().getRepositoryStatistics();
        this.readCounter = statistics.getCounter(Type.SESSION_READ_COUNTER);
        this.writeCounter = statistics.getCounter(Type.SESSION_WRITE_COUNTER);
        this.readDuration = statistics.getCounter(Type.SESSION_READ_DURATION);
        this.writeDuration = statistics.getCounter(Type.SESSION_WRITE_DURATION);
        this.sessionCount = statistics.getCounter(Type.SESSION_COUNT);
        statistics.getCounter(Type.SESSION_LOGIN_COUNTER).incrementAndGet();
        sessionCount.incrementAndGet();
    }
View Full Code Here

        bundles = new ConcurrentCache<NodeId, NodePropBundle>(context.getHomeDir().getName() + "BundleCache");
        bundles.setMaxMemorySize(bundleCacheSize);
        bundles.setAccessListener(this);

        // statistics
        RepositoryStatisticsImpl stats = context.getRepositoryStatistics();
        readCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_READ_COUNTER);
        writeCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_WRITE_COUNTER);
        writeDuration = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_WRITE_DURATION);
        cacheAccessCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_ACCESS_COUNTER);
        cacheSizeCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_SIZE_COUNTER);
        cacheMissCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_MISS_COUNTER);
        cacheMissDuration = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_MISS_DURATION);
    }
View Full Code Here

                new MemoryFileSystem(),
                RepositoryImpl.ROOT_NODE_ID,
                new NamespaceRegistryImpl(new MemoryFileSystem()),
                null,
                null,
                new RepositoryStatisticsImpl()));
        try {
            assertCreateNewNode(manager);
            assertCreateNewProperty(manager);
            assertMissingItemStates(manager);
            assertCreateUpdateDelete(manager);
View Full Code Here

                    }
                });
        time = System.nanoTime() - time;
        final long timeMs = time / 1000000;
        log.debug("executed in {} ms. ({})", timeMs, statement);
        RepositoryStatisticsImpl statistics = sessionContext
                .getRepositoryContext().getRepositoryStatistics();
        statistics.getCounter(Type.QUERY_COUNT).incrementAndGet();
        statistics.getCounter(Type.QUERY_DURATION).addAndGet(timeMs);
        sessionContext.getRepositoryContext().getStatManager().getQueryStat()
                .logQuery(language, statement, timeMs);
        return result;
    }
View Full Code Here

                    }
                });
        time = System.nanoTime() - time;
        final long timeMs = time / 1000000;
        log.debug("executed in {} ms. ({})", timeMs, statement);
        RepositoryStatisticsImpl statistics = sessionContext
                .getRepositoryContext().getRepositoryStatistics();
        statistics.getCounter(Type.QUERY_COUNT).incrementAndGet();
        statistics.getCounter(Type.QUERY_DURATION).addAndGet(timeMs);
        sessionContext.getRepositoryContext().getStatManager().getQueryStat()
                .logQuery(language, statement, timeMs);
        return result;
    }
View Full Code Here

        bundles = new ConcurrentCache<NodeId, NodePropBundle>(context.getHomeDir().getName() + "BundleCache");
        bundles.setMaxMemorySize(bundleCacheSize);
        bundles.setAccessListener(this);

        // statistics
        RepositoryStatisticsImpl stats = context.getRepositoryStatistics();
        readCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_READ_COUNTER);
        writeCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_WRITE_COUNTER);
        writeDuration = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_WRITE_DURATION);
        cacheAccessCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_ACCESS_COUNTER);
        cacheSizeCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_SIZE_COUNTER);
        cacheMissCounter = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_MISS_COUNTER);
        cacheMissDuration = stats.getCounter(
                RepositoryStatistics.Type.BUNDLE_CACHE_MISS_DURATION);
    }
View Full Code Here

     * Create a new instance of this class registering all repository wide
     * statistics with the passed {@code whiteboard}.
     * @param whiteboard   whiteboard for registering the individual statistics with
     */
    public StatisticManager(Whiteboard whiteboard, ScheduledExecutorService executor) {
        repoStats = new RepositoryStatisticsImpl(executor);
        maxQueueLength = new TimeSeriesMax(executor);
        registration = new CompositeRegistration(
            registerMBean(whiteboard, QueryStatManagerMBean.class, new QueryStatManager(queryStat),
                    "QueryStat", "Oak Query Statistics"),
            registerMBean(whiteboard, RepositoryStatsMBean.class, new RepositoryStats(repoStats, maxQueueLength),
View Full Code Here

     * statistics with the passed {@code whiteboard}.
     * @param whiteboard   whiteboard for registering the individual statistics with
     */
    public StatisticManager(Whiteboard whiteboard, ScheduledExecutorService executor) {
        queryStat.setEnabled(true);
        repoStats = new RepositoryStatisticsImpl(executor);
        maxQueueLength = new TimeSeriesMax(executor);
        registration = new CompositeRegistration(
            registerMBean(whiteboard, QueryStatManagerMBean.class, new QueryStatManager(queryStat),
                    "QueryStat", "Oak Query Statistics"),
            registerMBean(whiteboard, RepositoryStatsMBean.class, new RepositoryStats(repoStats, maxQueueLength),
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.stats.RepositoryStatisticsImpl

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.