latchStats.cloneGroup(config.getClear()),
tableStats.cloneGroup(config.getClear()));
}
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. */