}
if (hstore_conf.site.profiling && hstore_site.getProfiler() != null) {
// Compute the approximate arrival rate of transaction
// requests per second from clients
HStoreSiteProfiler profiler = hstore_site.getProfiler();
pm = profiler.network_processing;
double totalTime = System.currentTimeMillis() - startTime;
double arrivalRate = (totalTime > 0 ? (pm.getInvocations() / totalTime) : 0d);
value = String.format("%.02f txn/sec [total=%d]", arrivalRate, pm.getInvocations());
siteInfo.put("Arrival Rate", value);
pm = profiler.network_backup_off;
siteInfo.put("Back Pressure Off", ProfileMeasurementUtil.formatComparison(pm, null, true));
pm = profiler.network_backup_on;
siteInfo.put("Back Pressure On", ProfileMeasurementUtil.formatComparison(pm, null, true));
}
// TransactionQueueManager
TransactionQueueManager queueManager = hstore_site.getTransactionQueueManager();
TransactionQueueManager.Debug queueManagerDebug = queueManager.getDebugContext();
int inflight_cur = siteDebug.getInflightTxnCount();
if (inflight_cur < this.inflight_min && inflight_cur > 0) this.inflight_min = inflight_cur;
if (inflight_cur > this.inflight_max) this.inflight_max = inflight_cur;
// CommandLogWriter
int inflight_cmdlog = 0;
CommandLogWriter cmdLogger = hstore_site.getCommandLogWriter();
if (cmdLogger != null) {
inflight_cmdlog = cmdLogger.getTotalTxnCount();
}
siteInfo.put("InFlight Txns",
String.format("%d total / %d init / %d queued / %d restart / %d cmdlog / %d deletable " +
"[totalMin=%d, totalMax=%d]",
inflight_cur, // total
queueManagerDebug.getInitQueueSize(), // init
queueManagerDebug.getLockQueueSize(), // queued
queueManagerDebug.getRestartQueueSize(), // restart
inflight_cmdlog, // cmdlog
this.siteDebug.getDeletableTxnCount(), // deletable
this.inflight_min, // totalMin
this.inflight_max // totalMax
));
if (hstore_conf.site.status_check_for_zombies) {
this.zombieInfo(siteInfo);
}
if (hstore_conf.site.profiling) {
HStoreSiteProfiler profiler = this.hstore_site.getProfiler();
pm = profiler.network_idle;
value = ProfileMeasurementUtil.formatComparison(pm, this.lastNetworkIdle, true);
siteInfo.put("Network Idle", value);
this.lastNetworkIdle = new ProfileMeasurement(pm);