コード例 #1
0
        public async Task <Report> RunAsync(int run, int concurrentPerRun, TimeSpan duration)
        {
            ILoadGrain load = this.client.GetGrain <ILoadGrain>(Guid.NewGuid());
            await load.Generate(run, concurrentPerRun);

            await Task.Delay(duration);

            return(await load.TryGetReport());
        }
コード例 #2
0
        public async Task <Report> RunAsync(int run, int transactiosPerRun, int concurrentPerRun)
        {
            ILoadGrain load = this.host.Client.GetGrain <ILoadGrain>(Guid.NewGuid());
            await load.Generate(run, transactiosPerRun, concurrentPerRun);

            Report report = null;

            while (report == null)
            {
                await Task.Delay(TimeSpan.FromSeconds(10));

                report = await load.TryGetReport();
            }
            return(report);
        }
コード例 #3
0
        public async Task <Report> RunAsync(int run, int concurrentPerRun, TimeSpan duration)
        {
            ILoadGrain load = this._host.Client.GetGrain <ILoadGrain>(Guid.NewGuid());
            await load.Generate(run, concurrentPerRun, duration);

            Report report = null;

            while (report == null)
            {
                await Task.Delay(1000);

                report = await load.TryGetReport();
            }
            return(report);
        }