本文整理汇总了Java中com.sleepycat.je.StatsConfig类的典型用法代码示例。如果您正苦于以下问题:Java StatsConfig类的具体用法?Java StatsConfig怎么用?Java StatsConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StatsConfig类属于com.sleepycat.je包,在下文中一共展示了StatsConfig类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public void loadStats(StatsConfig config, EnvironmentStats stat)
throws DatabaseException {
stat.setNEvictPasses(nEvictPasses);
stat.setNNodesSelected(nNodesSelected);
stat.setNNodesScanned(nNodesScanned);
stat.setNNodesExplicitlyEvicted(nNodesEvicted);
stat.setNBINsStripped(nBINsStripped);
stat.setRequiredEvictBytes(currentRequiredEvictBytes);
if (config.getClear()) {
nEvictPasses = 0;
nNodesSelected = 0;
nNodesScanned = 0;
nNodesEvicted = 0;
nBINsStripped = 0;
}
}
开发者ID:nologic,项目名称:nabs,代码行数:22,代码来源:Evictor.java
示例2: lockStat
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Statistics
*/
public LockStats lockStat(StatsConfig config)
throws DatabaseException {
LockStats stats = new LockStats();
stats.setNRequests(nRequests);
stats.setNWaits(nWaits);
if (config.getClear()) {
nWaits = 0;
nRequests = 0;
}
for (int i = 0; i < nLockTables; i++) {
LatchStats latchStats =
(LatchStats) lockTableLatches[i].getLatchStats();
stats.accumulateLockTableLatchStats(latchStats);
}
/* Dump info about the lock table. */
if (!config.getFast()) {
dumpLockTable(stats);
}
return stats;
}
开发者ID:nologic,项目名称:nabs,代码行数:27,代码来源:LockManager.java
示例3: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
public void loadStats(StatsConfig config, EnvironmentStats stats)
throws DatabaseException {
stats.setNRepeatFaultReads(nRepeatFaultReads);
stats.setNTempBufferWrites(nTempBufferWrites);
if (config.getClear()) {
nRepeatFaultReads = 0;
nTempBufferWrites = 0;
}
logBufferPool.loadStats(config, stats);
fileManager.loadStats(config, stats);
if (!config.getFast()) {
loadEndOfLogStat(stats);
}
}
开发者ID:nologic,项目名称:nabs,代码行数:17,代码来源:LogManager.java
示例4: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public void loadStats(StatsConfig config, EnvironmentStats stat)
throws DatabaseException {
stat.setNCheckpoints(nCheckpoints);
stat.setLastCheckpointStart(lastCheckpointStart);
stat.setLastCheckpointEnd(lastCheckpointEnd);
stat.setLastCheckpointId(checkpointId);
stat.setNFullINFlush(flushStats.nFullINFlush);
stat.setNFullBINFlush(flushStats.nFullBINFlush);
stat.setNDeltaINFlush(flushStats.nDeltaINFlush);
if (config.getClear()) {
nCheckpoints = 0;
flushStats.nFullINFlush = 0;
flushStats.nFullBINFlush = 0;
flushStats.nDeltaINFlush = 0;
}
}
开发者ID:nologic,项目名称:nabs,代码行数:22,代码来源:Checkpointer.java
示例5: testSingleDegree3TxnOptimization
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Tests that with a single degree 3 txn we don't obtain the extra lock
* during insert.
*/
public void testSingleDegree3TxnOptimization()
throws DatabaseException, InterruptedException {
openEnv(false);
/* Insert key 2. */
insert(2);
StatsConfig clearStats = new StatsConfig();
clearStats.setClear(true);
/* Clear before inserting. */
LockStats stats = env.getLockStats(clearStats);
/* Insert key 1, which would lock key 2 while inserting. */
insert(1);
/* Expect a single lock was requested. */
stats = env.getLockStats(clearStats);
assertEquals(1, stats.getNRequests());
closeEnv();
}
开发者ID:nologic,项目名称:nabs,代码行数:28,代码来源:PhantomTest.java
示例6: doOne
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
private void doOne(String msg,
Sequence seq,
Transaction txn,
int delta,
long expectValue,
boolean expectCached)
throws DatabaseException {
msg += " value=" + expectValue;
try {
assertEquals(msg, expectValue, seq.get(txn, delta));
} catch (DatabaseException e) {
fail(msg + ' ' + e);
}
StatsConfig clearConfig = new StatsConfig();
clearConfig.setFast(true);
clearConfig.setClear(true);
SequenceStats stats = seq.getStats(clearConfig);
assertEquals(msg, 1, stats.getNGets());
assertEquals(msg, expectCached ? 1 : 0, stats.getNCachedGets());
}
开发者ID:nologic,项目名称:nabs,代码行数:25,代码来源:SequenceTest.java
示例7: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public void loadStats(StatsConfig config, EnvironmentStats stat)
throws DatabaseException {
stat.setNEvictPasses(nEvictPasses);
stat.setNNodesSelected(nNodesSelected);
stat.setNNodesScanned(nNodesScanned);
stat.setNNodesExplicitlyEvicted(nNodesEvicted);
stat.setNBINsStripped(nBINsStripped);
stat.setRequiredEvictBytes(currentRequiredEvictBytes);
if (config.getClear()) {
nEvictPasses = 0;
nNodesSelected = 0;
nNodesScanned = 0;
nNodesEvicted = 0;
nBINsStripped = 0;
}
}
开发者ID:nologic,项目名称:nabs,代码行数:22,代码来源:Evictor.java
示例8: lockStat
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Statistics
*/
public LockStats lockStat(StatsConfig config)
throws DatabaseException {
LockStats stats = new LockStats();
stats.setNRequests(nRequests);
stats.setNWaits(nWaits);
if (config.getClear()) {
nWaits = 0;
nRequests = 0;
}
for (int i = 0; i < nLockTables; i++) {
LatchStats latchStats =
(LatchStats) lockTableLatches[i].getLatchStats();
stats.accumulateLockTableLatchStats(latchStats);
}
/* Dump info about the lock table. */
if (!config.getFast()) {
dumpLockTable(stats);
}
return stats;
}
开发者ID:nologic,项目名称:nabs,代码行数:27,代码来源:LockManager.java
示例9: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public void loadStats(StatsConfig config, EnvironmentStats stat)
throws DatabaseException {
stat.setNCheckpoints(nCheckpoints);
stat.setLastCheckpointStart(lastCheckpointStart);
stat.setLastCheckpointEnd(lastCheckpointEnd);
stat.setLastCheckpointId(checkpointId);
stat.setNFullINFlush(flushStats.nFullINFlush);
stat.setNFullBINFlush(flushStats.nFullBINFlush);
stat.setNDeltaINFlush(flushStats.nDeltaINFlush);
if (config.getClear()) {
nCheckpoints = 0;
flushStats.nFullINFlush = 0;
flushStats.nFullBINFlush = 0;
flushStats.nDeltaINFlush = 0;
}
}
开发者ID:nologic,项目名称:nabs,代码行数:22,代码来源:Checkpointer.java
示例10: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public StatGroup loadStats(StatsConfig config) {
if (!config.getFast()) {
totalLogSize.set(profile.getTotalLogSize());
}
lnSizeCorrectionFactor.set(calculator.getLNSizeCorrectionFactor());
lastKnownUtilization.set(calculator.getLastKnownUtilization());
StatGroup copyStats = stats.cloneGroup(config.getClear());
/* Add the FileSelector's stats to the cleaner stat group. */
copyStats.addAll(fileSelector.loadStats());
return copyStats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:19,代码来源:Cleaner.java
示例11: loadStatsInternal
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Retrieve and return stat information.
*/
public EnvironmentStats loadStatsInternal(StatsConfig config)
throws DatabaseException {
EnvironmentStats envStats = new EnvironmentStats();
synchronized (statSynchronizer) {
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));
envStats.setStatGroup(thrputStats.cloneGroup(config.getClear()));
}
return envStats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:22,代码来源:EnvironmentImpl.java
示例12: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
public StatGroup loadStats(StatsConfig sc) {
StatGroup retgroup;
StatGroup sg = new StatGroup(GROUPNAME, GROUPDEF);
for (GarbageCollectorMXBean gcBean : gcBeans) {
String name = gcBean.getName();
String statname = name + GC_COUNT_NAME_SUFFIX;
new LongStat(
sg, statdefmap.get(statname), gcBean.getCollectionCount());
statname = name + GC_TIME_NAME_SUFFIX;
new LongStat(
sg, statdefmap.get(statname), gcBean.getCollectionTime());
}
new LongStat(sg, LOAD_AVERAGE, (long) JVMSystemUtils.getSystemLoad());
new LongStat(
sg, HEAP_MEMORY_USAGE, memoryBean.getHeapMemoryUsage().getUsed());
if (prev != null) {
retgroup = sg.computeInterval(prev);
} else {
retgroup = sg;
}
prev = sg;
return retgroup;
}
开发者ID:prat0318,项目名称:dbms,代码行数:26,代码来源:JvmStats.java
示例13: getINListStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Return stats for the multiple INLists covered by this evictor.
*/
@Override
StatGroup getINListStats(StatsConfig config) {
StatGroup totalINListStats = new StatGroup("temp", "temp");
if (config.getFast()) {
/*
* This is a slow stat for shared envs, because of the need to
* synchronize.
*/
return totalINListStats;
}
List<Subject> copy = null;
synchronized(this) {
copy = new ArrayList<Subject>(subjects);
}
for (Subject s: copy) {
totalINListStats.addAll(s.env.getInMemoryINs().loadStats());
}
return totalINListStats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:27,代码来源:SharedSelector.java
示例14: lockStat
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Statistics
*/
public LockStats lockStat(StatsConfig config)
throws DatabaseException {
StatGroup latchStats = new StatGroup("Locktable latches",
"Shows lock table contention");
for (int i = 0; i < nLockTables; i++) {
latchStats.addAll(lockTableLatches[i].getLatchStats());
}
/* Dump info about the lock table. */
StatGroup tableStats =
new StatGroup("Locktable",
"The types of locks held in the lock table");
if (!config.getFast()) {
dumpLockTable(tableStats, false /*clear*/);
}
return new LockStats(stats.cloneGroup(config.getClear()),
latchStats.cloneGroup(config.getClear()),
tableStats.cloneGroup(config.getClear()));
}
开发者ID:prat0318,项目名称:dbms,代码行数:25,代码来源:LockManager.java
示例15: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
public StatGroup loadStats(StatsConfig config) {
StatGroup copyStats = stats.cloneGroup(config.getClear());
StatGroup latchStats = new StatGroup("Locktable latches",
"Shows lock table contention");
for (int i = 0; i < nLockTables; i++) {
latchStats.addAll(lockTableLatches[i].getLatchStats());
if (config.getClear()) {
lockTableLatches[i].clear();
}
}
/* Add all the latch stats to the whole stats group. */
copyStats.addAll(latchStats);
StatGroup tableStats =
new StatGroup("Locktable",
"The types of locks held in the lock table");
if (!config.getFast()) {
dumpLockTable(tableStats, config.getClear());
}
/* Add all the lock table stats to the whole stats group. */
copyStats.addAll(tableStats);
return copyStats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:26,代码来源:LockManager.java
示例16: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
StatGroup loadStats(StatsConfig config)
throws DatabaseException {
/* Also return buffer pool memory usage */
bufferPoolLatch.acquire();
long bufferBytes = 0;
int nLogBuffers = 0;
try {
Iterator<LogBuffer> iter = bufferPool.iterator();
while (iter.hasNext()) {
LogBuffer l = iter.next();
nLogBuffers++;
bufferBytes += l.getCapacity();
}
} finally {
bufferPoolLatch.release();
}
logBuffers.set(nLogBuffers);
nBufferBytes.set(bufferBytes);
return stats.cloneGroup(config.getClear());
}
开发者ID:prat0318,项目名称:dbms,代码行数:23,代码来源:LogBufferPool.java
示例17: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
public StatGroup loadStats(StatsConfig config)
throws DatabaseException {
if (!config.getFast()) {
loadEndOfLogStat();
}
StatGroup copyStats = stats.cloneGroup(config.getClear());
/* Add all the LogBufferPool's stats to the LogManager's stat group. */
copyStats.addAll(logBufferPool.loadStats(config));
/* Add all the FileManager's stats to the LogManager's stat group. */
copyStats.addAll(fileManager.loadStats(config));
/* Add group commit statistics. */
copyStats.addAll(grpManager.loadStats(config));
return copyStats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:18,代码来源:LogManager.java
示例18: ReplicatedEnvironmentStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
ReplicatedEnvironmentStats(RepImpl repImpl, StatsConfig config) {
final RepNode repNode = repImpl.getRepNode();
final FeederManager feederManager = repNode.feederManager();
feederManagerStats = feederManager.getFeederManagerStats(config);
feederTxnStats = repNode.getFeederTxns().getStats(config);
final Replica replica = repNode.getReplica();
replayStats = replica.getReplayStats(config);
trackerStats = replica.getTrackerStats(config);
protocolStats = feederManager.getProtocolStats(config);
vlsnIndexStats = repImpl.getVLSNIndex().getStats(config);
protocolStats.addAll(replica.getProtocolStats(config));
addMessageRateStats();
addBytesRateStats();
}
开发者ID:prat0318,项目名称:dbms,代码行数:18,代码来源:ReplicatedEnvironmentStats.java
示例19: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Return stats
*/
public StatGroup loadStats(StatsConfig config) {
compQueueSize.set((long) getBinRefQueueSize());
if (DEBUG) {
System.out.println("lazyProcessed = " + lazyProcessed);
System.out.println("wokenUp=" + wokenUp);
}
if (config.getClear()) {
lazyProcessed = 0;
wokenUp = 0;
}
return stats.cloneGroup(config.getClear());
}
开发者ID:prat0318,项目名称:dbms,代码行数:19,代码来源:INCompressor.java
示例20: loadStats
import com.sleepycat.je.StatsConfig; //导入依赖的package包/类
/**
* Load stats.
*/
public StatGroup loadStats(StatsConfig config) {
StatGroup stats = new StatGroup(GROUP_NAME, GROUP_DESC);
new LongStat(stats, CKPT_LAST_CKPTID, checkpointId);
new LongStat(stats, CKPT_CHECKPOINTS, nCheckpoints);
new LSNStat(stats, CKPT_LAST_CKPT_START, lastCheckpointStart);
new LSNStat(stats, CKPT_LAST_CKPT_END, lastCheckpointEnd);
new LongStat(stats, CKPT_FULL_IN_FLUSH, flushStats.nFullINFlush);
new LongStat(stats, CKPT_FULL_BIN_FLUSH, flushStats.nFullBINFlush);
new LongStat(stats, CKPT_DELTA_IN_FLUSH, flushStats.nDeltaINFlush);
if (config.getClear()) {
nCheckpoints = 0;
flushStats.nFullINFlush = 0;
flushStats.nFullBINFlush = 0;
flushStats.nDeltaINFlush = 0;
}
return stats;
}
开发者ID:prat0318,项目名称:dbms,代码行数:23,代码来源:Checkpointer.java
注:本文中的com.sleepycat.je.StatsConfig类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论