in netcx/ec/lib/executioncontext.cpp [235:260]
static SetNameForHistogram(
_In_ Statistics::Histogram * histogram,
_In_ const GUID & ecIdentifer,
_In_ UNICODE_STRING const * ecFriendlyName,
_In_ ULONG pollTag
)
{
UNICODE_STRING guidStr = {0};
DECLARE_UNICODE_STRING_SIZE(histogramName, Statistics::HIST_NAME_SIZE);
auto status = RtlStringFromGUID(ecIdentifer, &guidStr);
if (NT_SUCCESS(status))
{
status = RtlUnicodeStringPrintf(&histogramName, L"%.4S:%wZ-%wZ", &pollTag, &guidStr, ecFriendlyName);
NT_FRE_ASSERT(status != STATUS_INVALID_PARAMETER);
histogram->SetName(histogramName);
}
else
{
DECLARE_CONST_UNICODE_STRING(errorName, L"NameGenerationError");
histogram->SetName(errorName);
}
RtlFreeUnicodeString(&guidStr);
}