コード例 #1
0
ファイル: LockManager.java プロジェクト: lzimm/qluster
  /** 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()));
  }
コード例 #2
0
ファイル: LockManager.java プロジェクト: lzimm/qluster
  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;
  }
コード例 #3
0
  /** @see LockManager#dumpLockTable */
  @Override
  void dumpLockTable(StatGroup stats, boolean clear) throws DatabaseException {

    superiorLockManager.dumpLockTable(stats, clear);
  }