Skip to content

Instantly share code, notes, and snippets.

@paulbatum
Created March 23, 2016 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulbatum/a21c6ca8dca81afb9e0e to your computer and use it in GitHub Desktop.
Save paulbatum/a21c6ca8dca81afb9e0e to your computer and use it in GitHub Desktop.
using System;
using System.Threading.Tasks;
using System.Diagnostics;
static Dictionary<int,byte[]> Allocations = new Dictionary<int,byte[]>();
public static async Task Run(string id, int message, TraceWriter log)
{
log.Verbose($"Machine: {Environment.MachineName}");
for(int i=0; i< 100; i++)
{
Allocations[i] = new Byte[message / 100];
log.Verbose($"Allocation count: {Allocations.Count}");
log.Verbose($"Private Memory Size: {Process.GetCurrentProcess().PrivateMemorySize64 / 1000000}mb");
await Task.Delay(500);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment