public void DataMessage(StressTestData message) { _dataCount++; UpdateMessageLabel(); DomainLbl.Text = message.Domain; UserLbl.Text = message.Username; }
/// <summary> /// 请求战绩1000次 /// </summary> /// <param name="data"></param> /// <returns></returns> private async Task StressTest_MyRecordReqTest1000(StressTestData data) { for (int i = 0; i < data.TestCount; i++) { Log.Debug("当前次数:" + i); data.CurrentTestCount++; await Task.Delay(500); await this.StressTest_MyRecordReq(); } }
/// <summary> /// 登入登出1000次用例 /// </summary> /// <returns></returns> private async Task StressTest_LoginInAndOut1000(StressTestData data) { for (int i = 0; i < data.TestCount; i++) { Log.Debug("当前次数:" + i); data.CurrentTestCount++; await Task.Delay(500); await this.StressTest_Login(); await Task.Delay(100); await this.StressTest_LoginOut(); } }
private void OnDataRecv(StressTestData message) { GetClientControl(message.Sender).DataMessage(message); }