Examples of EnvironmentStats


Examples of com.sleepycat.je.EnvironmentStats

            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:"
                               + environmentA.getConfig().getCacheSize());
            System.out.println("Shared.A:" + statsA.getSharedCacheTotalBytes() + " nSharedEnv:"
                               + statsA.getNSharedCacheEnvironments());
            maxCacheUsage = Math.max(maxCacheUsage, totalCacheSize);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

                    throw new IllegalStateException("Could not insert: " +
                                                    status);
                }

                if (i % 10000 == 0) {
                    final EnvironmentStats stats = env.getStats(null);
                    if (stats.getNNodesScanned() > 0) {
                        throw new IllegalStateException
                            ("*** Ran out of cache memory at record " + i +
                             " -- try increasing Java heap size ***");
                    }
                    if (out != null) {
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

        if (out != null) {
            out.println();
            out.println(msg + ':');
        }

        final EnvironmentStats stats = env.getStats(null);
        final long btreeSize = DbInternal.getEnvironmentImpl(env).
            getMemoryBudget().getTreeMemoryUsage();

        if (out != null) {
            out.println
                ("CacheSize=" +
                 INT_FORMAT.format(stats.getCacheTotalBytes()) +
                 " BtreeSize=" + INT_FORMAT.format(btreeSize+
                 " BottomINs=" + INT_FORMAT.format(stats.getNCachedBINs()) +
                 " UpperINs=" +
                 INT_FORMAT.format(stats.getNCachedUpperINs()) +
                 " NCacheMiss=" + INT_FORMAT.format(stats.getNCacheMiss()));
        }

        if (stats.getNNodesScanned() > 0) {
            throw new IllegalStateException
                ("*** All records did not fit in the cache ***");
        }
        return btreeSize;
    }
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

     * Retrieve and return stat information.
     */
    public synchronized EnvironmentStats loadStats(StatsConfig config)
        throws DatabaseException {

        EnvironmentStats envStats = new EnvironmentStats();

        envStats.setINCompStats(inCompressor.loadStats(config));
        envStats.setCkptStats(checkpointer.loadStats(config));
        envStats.setCleanerStats(cleaner.loadStats(config));
        envStats.setLogStats(logManager.loadStats(config));
        envStats.setMBAndEvictorStats(memoryBudget.loadStats(),
                                      evictor.loadStats(config));
        envStats.setLockStats(txnManager.loadStats(config));
        envStats.setEnvImplStats(loadEnvImplStats(config));

        return envStats;
    }
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

            while (true) {
                try {
                    synchronized (this) {
                        wait(30 * 1000);
                    }
                    EnvironmentStats stats = env.getStats(clearConfig);
                    System.out.println("\n" + stats + "\n");
                } catch (DatabaseException e) {
                    e.printStackTrace();
                    break;
                } catch (InterruptedException e) {
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

        return getFastStats().getNCachedUpperINs();
    }

    @JmxGetter(name = "EvictedBINs")
    public long getEvictedBINs() {
        EnvironmentStats stats = getFastStats();
        return stats.getNBINsEvictedCacheMode() + stats.getNBINsEvictedCritical()
               + stats.getNBINsEvictedDaemon() + stats.getNBINsEvictedManual();
    }
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

               + stats.getNBINsEvictedDaemon() + stats.getNBINsEvictedManual();
    }

    @JmxGetter(name = "EvictedINs")
    public long getEvictedINs() {
        EnvironmentStats stats = getFastStats();
        return stats.getNUpperINsEvictedCacheMode() + stats.getNUpperINsEvictedCritical()
               + stats.getNUpperINsEvictedDaemon() + stats.getNUpperINsEvictedManual();
    }
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

            fileManager = env.getFileManager();
            logManager = env.getLogManager();
            verifyOkayItems(logManager, testRecs, testLsns, false);

            /* Check that we read these items off disk. */
            EnvironmentStats stats = new EnvironmentStats();
            StatsConfig config = new StatsConfig();
            logManager.loadStats(config, stats);
            assertTrue(stats.getNNotResident() >= testRecs.size());

        } catch (Throwable t) {
            t.printStackTrace();
            throw t;
        } finally {
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

     * Retrieve and return stat information.
     */
    synchronized public EnvironmentStats loadStats(StatsConfig config)
        throws DatabaseException {

        EnvironmentStats stats = new EnvironmentStats();
        inCompressor.loadStats(config, stats);
        evictor.loadStats(config, stats);
        checkpointer.loadStats(config, stats);
        cleaner.loadStats(config, stats);
        logManager.loadStats(config, stats);
View Full Code Here

Examples of com.sleepycat.je.EnvironmentStats

    env.checkpoint(chkConf);
    fail("expected DatabaseException");
      } catch (DatabaseException DE) {
      }

      EnvironmentStats stats = env.getStats(null);
      assertTrue((stats.getNFullINFlush() +
      stats.getNFullBINFlush()) > 0);

      /* Read back the data and make sure it all looks ok. */
      for (int i = 0; i < N_RECS; i++) {
    String keyStr = Integer.toString(keyInt);
    DatabaseEntry key =
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.