{"id":664,"date":"2011-05-31T22:28:32","date_gmt":"2011-06-01T02:28:32","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/?page_id=664"},"modified":"2012-10-09T16:06:58","modified_gmt":"2012-10-09T20:06:58","slug":"trace-logs","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/deployment\/trace-logs\/","title":{"rendered":"Transaction Trace Logs"},"content":{"rendered":"
H-Store supports the ability to write all transaction executions to JSON-based trace files.<\/p>\n
Note that these logs are not used for recovery, but are rather for post-processing and other database design tools provided by H-Store.<\/p>\n
When executing a benchmark, use the trace<\/tt> 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<\/tt> option. For example, assume the target cluster below has four execution sites running on four different machines:<\/p>\n Each HStoreSite will create a new file \/path\/to\/tpcc.log-X<\/tt> relative to base directory of where H-Store is deployed from (where X<\/tt> is the site id that produced the file).<\/p>\n You can also configure H-Store to ignore certain transactions when creating the trace logs by changing the workload.ignore<\/tt> property in the benchmark property files.<\/p>\n 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<\/tt> command can be used to do this. The workload<\/tt> option specifies the input files that you want to combine together, and the output<\/tt> command is where the combined files will be written to. You can use the wildcard character (*) for the input value.<\/p>\n The following is the JSON schema of the transaction and query traces generated by H-Store.<\/p>\n <\/a>ant hstore-benchmark<\/tt> -Dproject=$BENCHMARK -Dtrace=\/path\/to\/tpcc.log<\/pre>\n
Combining Multiple Traces into a Single File<\/h2>\n
ant workload-combine<\/tt> -Dproject=$BENCHMARK -Dworkload=\/path\/to\/tpcc.log* -Doutput=tpcc.combined<\/pre>\n
JSON Format<\/h2>\n
\r\n<transaction<\/a>><\/b> = {\r\n \"TxnId<\/a>\": <integer>, \/\/ Unique Transaction Identifier<\/i>\r\n \"Name<\/a>\": <string>, \/\/ Stored Procedure Name<\/i>\r\n \"Start<\/a>\": <integer>, \/\/ Transaction Start Time<\/i>\r\n \"Stop<\/a>\": <integer>, \/\/ Transaction Stop Time<\/i>\r\n \"Aborted<\/a>\": <boolean> \/\/ True if Transaction was Aborted<\/i>\r\n \"Params<\/a>\": [ <param><\/b>* ], \/\/ Stored Procedure Input Parameters<\/i>\r\n \"Queries<\/a>\": [ <query><\/b>* ], \/\/ Queries Executed in Transaction<\/i>\r\n \"Output<\/a>\": [ <output><\/b>* ], \/\/ Optional final output for Transaction<\/i>\r\n}\r\n<query<\/a>><\/b> = {\r\n \"Name<\/a>\": <string>, \/\/ Query Name<\/i>\r\n \"Batch<\/a>\": <integer>, \/\/ Optional Batch Identifier (Starting at zero)<\/i>\r\n \"Start<\/a>\": <integer>, \/\/ Query Start Time<\/i>\r\n \"Stop<\/a>\": <integer>, \/\/ Query Stop Time<\/i>\r\n \"Aborted<\/a>\": <boolean> \/\/ True if Query was Aborted<\/i>\r\n \"Params<\/a>\": [ <param><\/b>* ], \/\/ Query Input Parameters<\/i>\r\n \"Output<\/a>\": [ <output><\/b>* ], \/\/ Optional result for Query<\/i>\r\n}\r\n<output<\/a>><\/b> = {\r\n \"Types<\/a>\": [ <string><\/b>* ], \/\/ List of output types for data columns<\/i>\r\n \"Data<\/a>\": [ [ <param><\/b>* ]* ], \/\/ List of data row lists<\/i>\r\n}\r\n<param><\/b> = [ <integer>|<string>|<timestamp>|<boolean> ]*\r\n<\/pre>\n
\nTransaction Record Fields<\/b><\/p>\n