Add prints to error states in perf testing to display where initialization is failing (#875)

* Add prints to error states in perf testing to display where initialization is failing

* Print current user and other small bugs found.

* Only print user name on windows

* Revert user print
This commit is contained in:
Thad House 2020-09-30 15:47:13 -07:00 коммит произвёл GitHub
Родитель 32301b510e
Коммит 65458cd3c0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -171,7 +171,7 @@ function Invoke-TestCommand {
function Wait-ForRemoteReady {
param ($Job, $Matcher)
$StopWatch = [system.diagnostics.stopwatch]::StartNew()
while ($StopWatch.ElapsedMilliseconds -lt 10000) {
while ($StopWatch.ElapsedMilliseconds -lt 20000) {
$CurrentResults = Receive-Job -Job $Job -Keep
if (![string]::IsNullOrWhiteSpace($CurrentResults)) {
$DidMatch = $CurrentResults -match $Matcher

Просмотреть файл

@ -139,7 +139,6 @@ QuicKernelMain(
return QUIC_STATUS_INVALID_STATE;
}
printf("Right before run\n");
uint32_t OutBufferWritten = 0;
bool RunSuccess = false;
if (!DriverClient.Run(IOCTL_QUIC_RUN_PERF, Data, (uint32_t)TotalLength, 30000)) {

Просмотреть файл

@ -79,6 +79,7 @@ QuicMainStart(
Binding = nullptr;
Status = QuicDataPathInitialize(0, DatapathReceive, DatapathUnreachable, &Datapath);
if (QUIC_FAILED(Status)) {
WriteOutput("Datapath for shutdown failed to initialize: %d\n", Status);
return Status;
}
@ -86,25 +87,26 @@ QuicMainStart(
Status = QuicDataPathBindingCreate(Datapath, &LocalAddress.SockAddr, nullptr, StopEvent, &Binding);
if (QUIC_FAILED(Status)) {
QuicDataPathUninitialize(Datapath);
WriteOutput("Datapath Binding for shutdown failed to initialize: %d\n", Status);
return Status;
}
}
MsQuic = new(std::nothrow) MsQuicApi;
if (MsQuic == nullptr) {
WriteOutput("MsQuic Alloc Out of Memory\n");
return QUIC_STATUS_OUT_OF_MEMORY;
}
if (QUIC_FAILED(Status = MsQuic->GetInitStatus())) {
delete MsQuic;
MsQuic = nullptr;
WriteOutput("MsQuic Failed To Initialize: %d\n", Status);
return Status;
}
if (ServerMode) {
TestToRun = new(std::nothrow) PerfServer(SelfSignedCredConfig);
} else {
if (IsValue(TestName, "Throughput") || IsValue(TestName, "tput")) {
TestToRun = new(std::nothrow) ThroughputClient;
} else if (IsValue(TestName, "RPS")) {
@ -124,9 +126,14 @@ QuicMainStart(
Status = TestToRun->Start(StopEvent);
if (QUIC_SUCCEEDED(Status)) {
return QUIC_STATUS_SUCCESS;
} else {
WriteOutput("Test Failed To Start: %d\n", Status);
}
} else {
WriteOutput("Test Failed To Initialize: %d\n", Status);
}
} else {
WriteOutput("Test Alloc Out Of Memory\n");
Status = QUIC_STATUS_OUT_OF_MEMORY;
}

Просмотреть файл

@ -208,8 +208,8 @@ QuicProcessorInfoInit(
uint32_t ProcessorOffset = 0;
for (WORD i = 0; i < Info->Group.ActiveGroupCount; ++i) {
uint32_t IndexToSet = Index - ProcessorOffset;
QUIC_DBG_ASSERT(IndexToSet < 64);
if (IndexToSet < Info->Group.GroupInfo[i].ActiveProcessorCount) {
QUIC_DBG_ASSERT(IndexToSet < 64);
QuicProcessorInfo[Index].Group = i;
QuicProcessorInfo[Index].Index = IndexToSet;
QuicProcessorInfo[Index].MaskInGroup = 1ull << IndexToSet;