Documentation > Debugging > Internal Transaction Profiling

  1. First start the H-Store cluster with both site.txn_counters and site.txn_profiling set to false.
  2. Now load the benchmark database without executing any of workload transactions:
    ant hstore-benchmark -Dproject=tpcc \
      -Dnoshutdown=true \
      -Dnostart=true \
      -Dnoexecute=true \
      -Dclient.scalefactor=0.5
  3. You can now enable the transaction counters and profilers from the command-line tool using the @SetConfiguration system procedure:
    $ echo "EXEC @SetConfiguration site.txn_profiling true" | ./hstore tpcc
    12:21:14,014 INFO  - Executing transaction @SetConfiguration([site.txn_profiling], [true])
    Result #1 / 1
      ┌────────────────────────────────────────────────────────┐
      │ NAME               | VALUE | UPDATED                   │
      │ ------------------------------------------------------ │
      │ site.txn_profiling | true  | 2012-08-02T12:21:14.031.0 │
      └────────────────────────────────────────────────────────┘
    1 row in set (0.12 sec)
    $ echo "EXEC @SetConfiguration site.txn_counters true" | ./hstore tpcc
    12:21:56,717 INFO  - Executing transaction @SetConfiguration([site.txn_counters], [true])
    Result #1 / 1
      ┌───────────────────────────────────────────────────────┐
      │ NAME              | VALUE | UPDATED                   │
      │ ----------------------------------------------------- │
      │ site.txn_counters | true  | 2012-08-02T12:21:56.736.0 │
      └───────────────────────────────────────────────────────┘
    1 row in set (0.12 sec)
  4. Execute the benchmark
    ant hstore-benchmark -Dproject=tpcc \
      -Dnoshutdown=true \
      -Dnostart=true \
      -Dnoloader=true \
      -Dclient.scalefactor=0.5 \
      -Dclient.threads_per_host=1 \
      -Dclient.txnrate=1000 \
      -Dclient.blocking=false
  5. Use the command-line tool again to execute the @Statistics system procedure to retrieve the internal transaction information
    $ echo "EXEC @Statistics TXNPROFILE 0" | ./hstore tpcc | less -S
    $ echo "EXEC @Statistics TXNCOUNTER 0" | ./hstore tpcc | less -S