package org.vanilladb.bench.benchmarks.tpcc;

import org.vanilladb.bench.benchmarks.tpcc.rte.TpccTxExecutor;
import org.vanilladb.bench.util.BenchProperties;

public class TpccParameters {

	// Scaling parameters
	public static final int NUM_WAREHOUSES;
	
	public static final boolean ENABLE_THINK_AND_KEYING_TIME;

	// Transaction frequency follows the mixture requirement
	public static final int FREQUENCY_TOTAL;
	public static final int FREQUENCY_NEW_ORDER;
	public static final int FREQUENCY_PAYMENT;
	public static final int FREQUENCY_ORDER_STATUS;
	public static final int FREQUENCY_DELIVERY;
	public static final int FREQUENCY_STOCK_LEVEL;
	
	static {
		NUM_WAREHOUSES = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".NUM_WAREHOUSES", 1);
		
		ENABLE_THINK_AND_KEYING_TIME = BenchProperties.getLoader()
				.getPropertyAsBoolean(TpccTxExecutor.class.getName() +
						".ENABLE_THINK_AND_KEYING_TIME", false);
		
		FREQUENCY_TOTAL = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_TOTAL", 100);
		FREQUENCY_NEW_ORDER = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_NEW_ORDER", 45);
		FREQUENCY_PAYMENT = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_PAYMENT", 43);
		FREQUENCY_ORDER_STATUS = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_ORDER_STATUS", 4);
		FREQUENCY_DELIVERY = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_DELIVERY", 4);
		FREQUENCY_STOCK_LEVEL = BenchProperties.getLoader().getPropertyAsInteger(
				TpccConstants.class.getName() + ".FREQUENCY_STOCK_LEVEL", 4);
	}

	// Range for uniformly selecting transaction type
	public static final int RANGE_NEW_ORDER = FREQUENCY_NEW_ORDER;
	public static final int RANGE_PAYMENT = RANGE_NEW_ORDER + FREQUENCY_PAYMENT;
	public static final int RANGE_ORDER_STATUS = RANGE_PAYMENT
			+ FREQUENCY_ORDER_STATUS;
	public static final int RANGE_DELIVERY = RANGE_ORDER_STATUS
			+ FREQUENCY_DELIVERY;
	public static final int RANGE_STOCK_LEVEL = RANGE_DELIVERY
			+ FREQUENCY_STOCK_LEVEL;
}

@@ -43,71 +43,8 @@
 c;%0A%0A
-import org.vanilladb.bench.benchmarks.tpcc.rte.TpccTxExecutor;%0A
 impo
@@ -88,16 +88,16 @@
 erties;%0A
+
 %0Apublic 
@@ -663,32 +663,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -817,18 +817,18 @@
 Tpcc
-TxExecutor
+Parameters
 .cla
@@ -966,32 +966,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -1103,32 +1103,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -1241,32 +1241,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -1382,32 +1382,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -1523,32 +1523,33 @@
 er(%0A%09%09%09%09Tpcc
-Constant
+Parameter
 s.class.getN
@@ -1671,16 +1671,17 @@
 Tpcc
-Constant
+Parameter
 s.cl

Fix a bug: wrong property names