public int run(String[] args) throws Exception {
int i = 0;
String cmd = args[i++];
if ("-generatetxn".equals(cmd)) {
TxnGenerator generator = new TxnGenerator(conf);
generator.start(args, i);
} else if ("-consumetxn".equals(cmd)) {
TxnConsumer consumer = new TxnConsumer(conf);
consumer.start(args, i);
}
return 0;