本文整理汇总了C++中SharedIOSQPtr::GetQMetrics方法的典型用法代码示例。如果您正苦于以下问题:C++ SharedIOSQPtr::GetQMetrics方法的具体用法?C++ SharedIOSQPtr::GetQMetrics怎么用?C++ SharedIOSQPtr::GetQMetrics使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharedIOSQPtr
的用法示例。
在下文中一共展示了SharedIOSQPtr::GetQMetrics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FrmwkEx
void
IOQRollChkDiff_r10b::VerifyQPointers(SharedIOSQPtr iosq, SharedIOCQPtr iocq)
{
struct nvme_gen_cq iocqMetrics = iocq->GetQMetrics();
struct nvme_gen_sq iosqMetrics = iosq->GetQMetrics();
uint32_t expectedVal = (2 + MAX(iocq->GetNumEntries(),
iosq->GetNumEntries())) % iocq->GetNumEntries();
if (iocqMetrics.head_ptr != expectedVal) {
iocq->Dump(FileSystem::PrepDumpFile(mGrpName, mTestName, "iocq",
"head_ptr"), "CQ Metrics Head Pointer Inconsistent");
throw FrmwkEx(HERE, "Expected IO CQ.head_ptr = 0x%04X but actual "
"IOCQ.head_ptr = 0x%04X", expectedVal, iocqMetrics.head_ptr);
}
expectedVal = (2 + MAX(iocq->GetNumEntries(), iosq->GetNumEntries())) %
iosq->GetNumEntries();
if (iosqMetrics.tail_ptr != expectedVal) {
iosq->Dump(FileSystem::PrepDumpFile(mGrpName, mTestName, "iosq",
"tail_ptr"), "SQ Metrics Tail Pointer Inconsistent");
throw FrmwkEx(HERE, "Expected IO SQ.tail_ptr = 0x%04X but actual "
"IOSQ.tail_ptr = 0x%04X", expectedVal, iosqMetrics.tail_ptr);
}
}