Skip to content

Commit

Permalink
Added new HStoreConf option 'client.output_markov_profiling'
Browse files Browse the repository at this point in the history
  • Loading branch information
apavlo committed Oct 25, 2012
1 parent 7889a48 commit 08d310a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions build-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<arg value="client.output_txn_profiling=${client.output_txn_profiling}" />
<arg value="client.output_txn_profiling_combine=${client.output_txn_profiling_combine}" />
<arg value="client.output_specexec_profiling=${client.output_specexec_profiling}" />
<arg value="client.output_markov_profiling=${client.output_markov_profiling}" />
<arg value="client.output_txn_counters=${client.output_txn_counters}" />
<arg value="client.output_txn_counters_combine=${client.output_txn_counters_combine}" />
<arg value="client.profiling=${client.profiling}" />
Expand Down
4 changes: 4 additions & 0 deletions src/benchmarks/edu/brown/api/BenchmarkController.java
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,9 @@ public void startSites() {
if (hstore_conf.client.output_specexec_profiling != null) {
m_config.siteParameters.put("site.specexec_profiling", Boolean.TRUE.toString());
}
if (hstore_conf.client.output_markov_profiling != null) {
m_config.siteParameters.put("site.markov_profiling", Boolean.TRUE.toString());
}
if (hstore_conf.client.output_txn_profiling != null) {
m_config.siteParameters.put("site.txn_profiling", Boolean.TRUE.toString());
}
Expand Down Expand Up @@ -1238,6 +1241,7 @@ private void postProcessBenchmark(Client client) throws Exception {
Pair.of(SysProcSelector.TXNPROFILER, hstore_conf.client.output_txn_profiling),
Pair.of(SysProcSelector.SITEPROFILER, hstore_conf.client.output_site_profiling),
Pair.of(SysProcSelector.SPECEXECPROFILER, hstore_conf.client.output_specexec_profiling),
Pair.of(SysProcSelector.MARKOVPROFILER, hstore_conf.client.output_markov_profiling),
Pair.of(SysProcSelector.TXNCOUNTER, hstore_conf.client.output_txn_counters),
};
for (Pair<SysProcSelector, String> pair : profilingData) {
Expand Down
9 changes: 9 additions & 0 deletions src/frontend/edu/brown/hstore/conf/HStoreConf.java
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,15 @@ public final class ClientConf extends Conf {
)
public String output_specexec_profiling;

@ConfigProperty(
description="Defines the path where the BenchmarkController will dump a CSV containing " +
"the MarkovEstimator profiling stats. Note that this will automatically enable " +
"${site.markov_profiling}, which will affect the runtime performance.",
defaultNull=true,
experimental=false
)
public String output_markov_profiling;

@ConfigProperty(
description="Defines the path where the BenchmarkController will dump a CSV containing " +
"transaction counter stats. This will contain information about how the " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,25 +188,12 @@ public MarkovEstimatorState startTransactionImpl(Long txn_id, int base_partition
throw new RuntimeException(ex);
}
assert(state.isInitialized()) :
"Unexecpted uninitialized MarkovEstimatorState\n" + state;
"Unexpectted uninitialized MarkovEstimatorState\n" + state;

MarkovVertex start = markov.getStartVertex();
assert(start != null) : "The start vertex is null. This should never happen!";
MarkovEstimate initialEst = state.createNextEstimate(start, true);
this.estimatePath(state, initialEst, catalog_proc, args);

// else {
// if (d) LOG.info(String.format("Using cached MarkovPathEstimator for %s [hashCode=%d, ratio=%.02f]",
// AbstractTransaction.formatTxnName(catalog_proc, txn_id),
// pathEstimator.hashCode(), markov.getAccuracyRatio()));
// assert(pathEstimator.isCached()) :
// String.format("The cached MarkovPathEstimator used by %s does not have its cached flag set [hashCode=%d]",
// AbstractTransaction.formatTxnName(catalog_proc, txn_id), pathEstimator.hashCode());
// assert(pathEstimator.getEstimate().isValid()) :
// String.format("Invalid MarkovEstimate for cache Estimator used by %s [hashCode=%d]",
// AbstractTransaction.formatTxnName(catalog_proc, txn_id), pathEstimator.hashCode());
// pathEstimator.getEstimate().incrementReusedCounter();
// }
assert(initialEst.getMarkovPath().isEmpty() == false);
if (d) {
String txnName = AbstractTransaction.formatTxnName(catalog_proc, txn_id);
Expand All @@ -217,7 +204,6 @@ public MarkovEstimatorState startTransactionImpl(Long txn_id, int base_partition
txnName, path.size(),
StringUtil.join("\n----------------------\n", path)));
}

}

// Update EstimatorState.prefetch any time we transition to a MarkovVertex where the
Expand Down

0 comments on commit 08d310a

Please sign in to comment.