Examples of StatsConfig


Examples of com.netflix.servo.stats.StatsConfig

    static final Logger LOGGER = LoggerFactory.getLogger(StatsTimerTest.class);

    @Override
    public StatsTimer newInstance(String name) {
        final double [] percentiles = {50.0, 95.0, 99.0, 99.5};
        final StatsConfig statsConfig = new StatsConfig.Builder()
                .withSampleSize(200000)
                .withPercentiles(percentiles)
                .withPublishStdDev(true)
                .withComputeFrequencyMillis(1000)
                .build();
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

            storeA.get(TestUtils.toByteArray(i + "A"), null);

            storeB.put(TestUtils.toByteArray(i + "B"), new Versioned<byte[]>(value), null);
            storeB.get(TestUtils.toByteArray(i + "B"), null);

            EnvironmentStats statsA = environmentA.getStats(new StatsConfig());
            EnvironmentStats statsB = environmentB.getStats(new StatsConfig());

            long totalCacheSize = statsA.getCacheTotalBytes() + statsB.getCacheTotalBytes();
            System.out.println("A.size:" + statsA.getCacheTotalBytes() + " B.size:"
                               + statsB.getCacheTotalBytes() + " total:" + totalCacheSize + " max:"
                               + maxCacheUsage + " cacheMax:"
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

    public void tearDown() throws Exception {
        FileDeleteStrategy.FORCE.delete(bdbMasterDir);
    }

    private EnvironmentStats getStats(Environment environment) {
        StatsConfig config = new StatsConfig();
        config.setFast(true);
        return environment.getStats(config);
    }
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

     * StatsConfig().setFast(false)));
     */

    sb.append("Total number of key-value pairs is ").append(_db.count()).append(".\n");
    sb.append("Total number of application elements is ").append(size()).append(".\n");
    final double cacheDataMB = _env.getStats(new StatsConfig().setFast(true)).getDataBytes()
        / (1024.0 * 1024);
    final double mem = (double) (Runtime.getRuntime().totalMemory() - Runtime.getRuntime()
        .freeMemory()) / 1024 / 1024;
    sb.append("Total heap space: ").append(mem).append(" MB.\n");
    final double cacheTotalMB = _env.getStats(new StatsConfig().setFast(true))
        .getCacheTotalBytes() / (1024.0 * 1024);
    sb.append("Total cache size is ").append(cacheTotalMB).append(" MBs.\n");
    sb.append("Cache size used for keys and data is ").append(cacheDataMB).append(" MBs.\n");

    final File storageDir = new File(_storagePath);
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

            worker.join();
        } catch (InterruptedException ex) {
            LOGGER.debug("Interrupted while waiting for worker to complete");
        }
        try {
            LOGGER.debug("FlumePersistenceManager dataset status: {}", database.getStats(new StatsConfig()));
            database.close();
        } catch (final Exception ex) {
            LOGGER.warn("Failed to close database", ex);
        }
        try {
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

    public ReplicatedEnvironmentStats getRepStats(StatsConfig config)
        throws DatabaseException {

        checkHandleIsValid();
        checkEnv();
        final StatsConfig useConfig =
            (config == null) ? StatsConfig.DEFAULT : config;
        return repImpl.getStats(useConfig);
    }
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

            } catch (DatabaseExistsException e) {
                /* Should never happen, ExclusiveCreate is false. */
                throw EnvironmentFailureException.unexpectedException(e);
            }

            StatsConfig statsConfig = new StatsConfig();
            if (progressInterval > 0) {
                statsConfig.setShowProgressInterval(progressInterval);
                statsConfig.setShowProgressStream(out);
            }

            DatabaseStats stats = db.getStats(statsConfig);
            out.println(stats);

View Full Code Here

Examples of com.sleepycat.je.StatsConfig

    /**
     * Helper for creating a StatsConfig object to use as an operation
     * parameter.
     */
    private StatsConfig getStatsConfig(Object[] params) {
        StatsConfig statsConfig = new StatsConfig();
        if ((params != null) && (params.length > 0) && (params[0] != null)) {
            Boolean clear = (Boolean) params[0];
            statsConfig.setClear(clear.booleanValue());
        }
        if ((params != null) && (params.length > 1) && (params[1] != null)) {
            Boolean fast = (Boolean) params[1];
            statsConfig.setFast(fast.booleanValue());
        }
        return statsConfig;
    }
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

        if (!configManager.getBoolean(EnvironmentParams.ENV_CHECK_LEAKS)) {
            return;
        }

        boolean clean = true;
        StatsConfig statsConfig = new StatsConfig();

        /* Fast stats will not return NTotalLocks below. */
        statsConfig.setFast(false);

        LockStats lockStat = lockStat(statsConfig);
        if (lockStat.getNTotalLocks() != 0) {
            clean = false;
            System.err.println("Problem: " + lockStat.getNTotalLocks() +
View Full Code Here

Examples of com.sleepycat.je.StatsConfig

    /**
     * Helper for creating a StatsConfig object to use as an operation
     * parameter.
     */
    protected StatsConfig getStatsConfig(Object[] params) {
        StatsConfig statsConfig = new StatsConfig();
        if ((params != null) && (params.length > 0) && (params[0] != null)) {
            Boolean clear = (Boolean) params[0];
            statsConfig.setClear(clear.booleanValue());
        }
        if ((params != null) && (params.length > 1) && (params[1] != null)) {
            Boolean fast = (Boolean) params[1];
            statsConfig.setFast(fast.booleanValue());
        }

        return statsConfig;
    }
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.