private IEnumerable <string> CollectActivationIds(IPlacementTestGrain grain, int sampleSize) { for (var i = 0; i < sampleSize; ++i) { yield return(grain.GetActivationId().Result); } }
private IEnumerable <IPEndPoint> SampleEndpoint(IPlacementTestGrain grain, int sampleSize) { for (var i = 0; i < sampleSize; ++i) { yield return(grain.GetEndpoint().Result); } }
private async Task <IPlacementTestGrain> GetGrainAtSilo(SiloAddress silo) { while (true) { IPlacementTestGrain grain = GrainClient.GrainFactory.GetGrain <IRandomPlacementTestGrain>(Guid.NewGuid()); SiloAddress address = await grain.GetLocation(); if (address.Equals(silo)) { return(grain); } } }
private int ActivationCount(IPlacementTestGrain grain, int sampleSize) { return(ActivationCount(CollectActivationIds(grain, sampleSize))); }
private int ActivationCount(IPlacementTestGrain grain, int sampleSize) { return ActivationCount(CollectActivationIds(grain, sampleSize)); }
private IEnumerable<string> CollectActivationIds(IPlacementTestGrain grain, int sampleSize) { for (var i = 0; i < sampleSize; ++i) yield return grain.GetActivationId().Result; }
private IEnumerable<IPEndPoint> SampleEndpoint(IPlacementTestGrain grain, int sampleSize) { for (var i = 0; i < sampleSize; ++i) yield return grain.GetEndpoint().Result; }