本文整理汇总了C++中TimeSpan::SetMeasureLatency方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSpan::SetMeasureLatency方法的具体用法?C++ TimeSpan::SetMeasureLatency怎么用?C++ TimeSpan::SetMeasureLatency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSpan
的用法示例。
在下文中一共展示了TimeSpan::SetMeasureLatency方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _ReadParametersFromCmdLine
//.........这里部分代码省略.........
else
{
fError = true;
}
}
break;
case 'I': //io priority
{
int x = atoi(arg + 1);
if (x > 0 && x < 4)
{
PRIORITY_HINT hint[] = { IoPriorityHintVeryLow, IoPriorityHintLow, IoPriorityHintNormal };
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
{
i->SetIOPriorityHint(hint[x - 1]);
}
}
else
{
fError = true;
}
}
break;
case 'l': //large pages
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
{
i->SetUseLargePages(true);
}
break;
case 'L': //measure latency
timeSpan.SetMeasureLatency(true);
break;
case 'n': //disable affinity (by default simple affinity is turned on)
timeSpan.SetDisableAffinity(true);
break;
case 'o': //request count (1==synchronous)
{
int c = atoi(arg + 1);
if (c > 0)
{
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
{
i->SetRequestCount(c);
}
}
else
{
fError = true;
}
}
break;
case 'p': //start async IO operations with the same offset
//makes sense only for -o2 and greater
for (auto i = vTargets.begin(); i != vTargets.end(); i++)
{
i->SetUseParallelAsyncIO(true);
}
break;
case 'P': //show progress every x IO operations