Atl2NmfSBenchmark/Make2AntSyncAtlExecutor.cs
/// <summary>
/// Measures the polling algorithm versus the incremental algorithm for the given parameters
/// </summary>
/// <param name="sizes">The values for n</param>
/// <param name="iterations">The amount of iterations</param>
/// <param name="workloadSize">The workload size</param>
Measures the polling algorithm versus the incremental algorithm for the given parameters
Measures the polling algorithm versus the incremental algorithm for the given parameters
public static void Measure(int[] sizes, int iterations, int workloadSize)
        {
            var times = new long[sizes.Length, iterations, 4];
            RunIteration(times, sizes[0], 0, 0, workloadSize);
            for (int sizeIdx = 0; sizeIdx < sizes.Length; sizeIdx++)
            {
                var n = sizes[sizeIdx];
                for (int iteration = 0; iteration < iterations; iteration++)
                {
                    Console.WriteLine("M2A SyncATL Generating workload for n={0},iteration={1}...", n, iteration);
                    RunIteration(times, n, sizeIdx, iteration, workloadSize);
                    GC.Collect();
                    GC.WaitForPendingFinalizers();
                }
            }
            WriteResultsToCsv(sizes, iterations, times);
        }
public static void Measure ( int [ ] sizes , int iterations , int workloadSize ) { var times = new long [ sizes . Length , iterations , 4 ] ; RunIteration ( times , sizes [ 0 ] , 0 , 0 , workloadSize ) ; for ( int sizeIdx = 0 ; sizeIdx < sizes . Length ; sizeIdx ++ ) { var n = sizes [ sizeIdx ] ; for ( int iteration = 0 ; iteration < iterations ; iteration ++ ) { Console . WriteLine ( " " , n , iteration ) ; RunIteration ( times , n , sizeIdx , iteration , workloadSize ) ; GC . Collect ( ) ; GC . WaitForPendingFinalizers ( ) ; } } WriteResultsToCsv ( sizes , iterations , times ) ; }
Measures the polling algorithm versus the incremental algorithm for the given parameters
Measures the polling algorithm versus the incremental algorithm for the given parameters
// Run an iteration for the smallest input size to warm up the CLR
sizes
int[]
The values for n
The values for n
iterations
int
The amount of iterations
The amount of iterations
workloadSize
int
The workload size
The workload size