Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.