VirtualBox

Changeset 49910 in vbox for trunk/src


Ignore:
Timestamp:
Dec 15, 2013 4:18:45 PM (11 years ago)
Author:
vboxsync
Message:

Extended the test, nothing exciting.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/Makefile.kmk

    r49909 r49910  
    963963+ $(VBoxCOM_0_OUTDIR)/VirtualBox.tlb: $(VBOX_IDL_FILE.MSCOM) | $$(dir $$@)
    964964        $(VBOX_WIN_MIDL) /nologo \
    965                 $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64" && "$(KBUILD_HOST)" == "win",/env amd64,/env win32) /target NT51 \
     965                $(if-expr "$(KBUILD_TARGET_ARCH)" == "amd64" && "$(KBUILD_HOST)" == "win",/env amd64,/env win32) \
     966                /robust /protocol all /target NT51 \
    966967                /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxCOM_0_OUTDIR)) \
    967968                /cpp_cmd $(subst $(EXEC_X86_WIN32),,$(call VBOX_FN_MAKE_WIN_PATH,$(TOOL_$(VBOX_VCC_TOOL)_CC))) \
  • trunk/src/VBox/Main/testcase/tstVBoxAPIPerf.cpp

    r49907 r49910  
    162162
    163163
     164static void tstApiPrf4(IVirtualBox *pVBox)
     165{
     166    RTTestSub(g_hTest, "IHost::GetProcessorFeature performance");
     167
     168    IHost      *pHost = NULL;
     169    HRESULT     hrc = pVBox->COMGETTER(Host)(&pHost);
     170    if (FAILED(hrc))
     171    {
     172        tstComExpr(hrc, "IVirtualBox::Host", __LINE__);
     173        return;
     174    }
     175
     176    uint32_t const  cCalls   = 65536;
     177    uint32_t        cLeft    = cCalls;
     178    uint64_t        uStartTS = RTTimeNanoTS();
     179    while (cLeft-- > 0)
     180    {
     181        BOOL fSupported;
     182        HRESULT hrc = pHost->GetProcessorFeature(ProcessorFeature_PAE, &fSupported);
     183        if (FAILED(hrc))
     184        {
     185            tstComExpr(hrc, "IHost::GetProcessorFeature", __LINE__);
     186            pHost->Release();
     187            return;
     188        }
     189    }
     190    uint64_t uElapsed = RTTimeNanoTS() - uStartTS;
     191    RTTestValue(g_hTest, "IHost::GetProcessorFeature average", uElapsed / cCalls, RTTESTUNIT_NS_PER_CALL);
     192    pHost->Release();
     193    RTTestSubDone(g_hTest);
     194}
     195
     196
    164197
    165198int main(int argc, char **argv)
     
    197230                /** @todo Find something that returns a 2nd instance of an interface and see
    198231                 *        how if wrapper stuff is reused in any way. */
     232                tstApiPrf4(ptrVBox);
    199233            }
    200234        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette