Skip to content

Instantly share code, notes, and snippets.

@Criteo-dotnet-blog
Created September 28, 2018 13:21
Show Gist options
  • Save Criteo-dotnet-blog/9b7902fc8bc1756a43a95969e7120dfa to your computer and use it in GitHub Desktop.
Save Criteo-dotnet-blog/9b7902fc8bc1756a43a95969e7120dfa to your computer and use it in GitHub Desktop.
private void OnContentionStop(ContentionTraceData data)
{
ContentionInfo info = _contentionStore.GetContentionInfo(data.ProcessID, data.ThreadID);
if (info == null)
return;
// unlucky case when we start to listen just after the ContentionStart event
if (info.ContentionStartRelativeMSec == 0)
return;
var contentionDurationMSec = data.TimeStampRelativeMSec - info.ContentionStartRelativeMSec;
var isManaged = (data.ContentionFlags == ContentionFlags.Managed);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment