예제 #1
0
 private IEnumerable <string> CollectActivationIds(IPlacementTestGrain grain, int sampleSize)
 {
     for (var i = 0; i < sampleSize; ++i)
     {
         yield return(grain.GetActivationId().Result);
     }
 }
예제 #2
0
 private IEnumerable <IPEndPoint> SampleEndpoint(IPlacementTestGrain grain, int sampleSize)
 {
     for (var i = 0; i < sampleSize; ++i)
     {
         yield return(grain.GetEndpoint().Result);
     }
 }
예제 #3
0
        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);
                }
            }
        }
예제 #4
0
 private int ActivationCount(IPlacementTestGrain grain, int sampleSize)
 {
     return(ActivationCount(CollectActivationIds(grain, sampleSize)));
 }
예제 #5
0
 private int ActivationCount(IPlacementTestGrain grain, int sampleSize)
 {
     return ActivationCount(CollectActivationIds(grain, sampleSize));
 }
예제 #6
0
 private IEnumerable<string> CollectActivationIds(IPlacementTestGrain grain, int sampleSize)
 {
     for (var i = 0; i < sampleSize; ++i)
         yield return grain.GetActivationId().Result;
 }
예제 #7
0
 private IEnumerable<IPEndPoint> SampleEndpoint(IPlacementTestGrain grain, int sampleSize)
 {
     for (var i = 0; i < sampleSize; ++i)
         yield return grain.GetEndpoint().Result;
 }