public override void Start() { // init this.output = new TPCCWorkloadOutput(); output.txFinalStatus = TxFinalStatus.UNKNOWN; // the first step // determine c_id this.C_ID = input.C_ID; if (C_ID == 0) // by c_last { var k = CustomerPayload.GetLastNameIndexKey(input.C_W_ID, input.C_D_ID, input.C_LAST); var ids = redisClient.GetAllItemsFromList(k); C_ID = Convert.ToUInt32(ids[ids.Count / 2]); // TODO order by c_first? } this.currentState = PaymentState.ReadC; var cpk = new CustomerPkey { C_ID = C_ID, C_D_ID = input.C_D_ID, C_W_ID = input.C_W_ID }; this.cpkStr = cpk.ToString(); this.AddReq(this.cpkStr); }
public override void Start() { // init this.output = new TPCCWorkloadOutput(); output.txFinalStatus = TxFinalStatus.UNKNOWN; this.olCount = this.input.OL_I_IDs.Length; this.items = new ItemPayload[olCount]; this.totalFee = 0.0; this.itemsData = new Tuple <string, int, char, double, double> [olCount]; this.i = 0; // the first step this.currentState = NewOrderState.ReadItems; ReadItem(); }