Documentation > Deployment > Transaction Trace Logs
H-Store supports the ability to write all transaction executions to JSON-based trace files.
Note that these logs are not used for recovery, but are rather for post-processing and other database design tools provided by H-Store.
Command-line Arguments
When executing a benchmark, use the trace option to specify the file path where each HStoreSite will write their transaction logs. The site id of each HStoreSite instance will be appended to the value of trace option. For example, assume the target cluster below has four execution sites running on four different machines:
ant hstore-benchmark -Dproject=$BENCHMARK -Dtrace=/path/to/tpcc.log
Each HStoreSite will create a new file /path/to/tpcc.log-X relative to base directory of where H-Store is deployed from (where X is the site id that produced the file).
You can also configure H-Store to ignore certain transactions when creating the trace logs by changing the workload.ignore property in the benchmark property files.
Combining Multiple Traces into a Single File
After executing a benchmark multiple times or on multiple machines, you may want to combine the multiple trace files into a single file. The workload-combine command can be used to do this. The workload option specifies the input files that you want to combine together, and the output command is where the combined files will be written to. You can use the wildcard character (*) for the input value.
ant workload-combine -Dproject=$BENCHMARK -Dworkload=/path/to/tpcc.log* -Doutput=tpcc.combined
JSON Format
The following is the JSON schema of the transaction and query traces generated by H-Store.
<transaction> = { "TxnId": <integer>, // Unique Transaction Identifier "Name": <string>, // Stored Procedure Name "Start": <integer>, // Transaction Start Time "Stop": <integer>, // Transaction Stop Time "Aborted": <boolean> // True if Transaction was Aborted "Params": [ <param>* ], // Stored Procedure Input Parameters "Queries": [ <query>* ], // Queries Executed in Transaction "Output": [ <output>* ], // Optional final output for Transaction } <query> = { "Name": <string>, // Query Name "Batch": <integer>, // Optional Batch Identifier (Starting at zero) "Start": <integer>, // Query Start Time "Stop": <integer>, // Query Stop Time "Aborted": <boolean> // True if Query was Aborted "Params": [ <param>* ], // Query Input Parameters "Output": [ <output>* ], // Optional result for Query } <output> = { "Types": [ <string>* ], // List of output types for data columns "Data": [ [ <param>* ]* ], // List of data row lists } <param> = [ <integer>|<string>|<timestamp>|<boolean> ]*
Field | Description |
---|---|
TxnId | A unique 64-bit transaction identifier. Must be globally unique if combining multiple trace records |
Name | The name of the stored procedure that was executed. |
Start | The time that this transaction first started executing (not when the request arrived), relative to the time that the DBMS started. |
Stop | The time that this transaction either committed or aborted, relative to the time that the DBMS started. |
Aborted | If the transaction invoked a user abort, then this field is true. Otherwise it is false. |
Params | An array of input parameters to the stored procedure invocation function. Each element in the array can be a scalar integer, string, timestamp, or boolean value, or another array of arbitrary length that contains scalar values. The values an embedded array must be of the same type. |
Queries | An arbitrary length list of Query objects that were executed by the transaction. |
Output |
Field | Description |
---|---|
Name | The name of the query that was executed. |
Batch | The batch number that this query invocation was a part of. |
Start | The time that this query invocation was dispatched for execution, relative to the time that the DBMS started. |
Stop | The time that this query returned the result to the transaction’s control code, relative to the time that the DBMS started. |
Aborted | This field will be true if the query was aborted. |
Params | An array of input parameters to the stored procedure invocation function. Each element in the array can be a scalar integer, string, timestamp, or boolean value. |
Output | The optional output results of this query. |
Sample Workloads
Previously executed workload traces for H-Store’s built-in benchmarks are available from the supplemental research files repository.
Benchmark | # of Transactions | # of Queries | Additional Info |
---|---|---|---|
TPC-C 32w (1) | 69,195 | 1,854,464 | 32 warehouses |
TPC-C 32w (2) | 69,194 | 1,862,672 | 32 warehouses |
TPC-C 100w (1) | 98,000 | 2,620,670 | 100 warehouses |
TPC-C 100w (2) | 97,999 | 2,631,586 | 100 warehouses |
TM1 (1) | 379,882 | 468,556 | – |
TM1 (2) | 379,953 | 468561 | – |
SEATS (1) | 248,010 | 966,131 | – |
SEATS (2) | 248,010 | 966,131 | – |
TPC-E | 233,903 | 3,848,835 | – |
AuctionMark (1) | 150,073 | 696,750 | – |
AuctionMark (2) | 150,072 | 608,614 | – |