Skip to content

"start time" is actually the end time? #225

Description

@rogerhub

So, the diskspd tool prints out a start time:

System information:

        computer name: foo-bar
        start time: 2025/07/29 01:23:45 UTC

However, my reading of this code suggests that this start time actually reflects the time when the benchmark ends?

https://github.com/microsoft/diskspd/blob/75d21324029af32f4b659e461c61c109608538a4/IORequestGenerator/IORequestGenerator.cpp#L2100C1-L2125C2

bool IORequestGenerator::GenerateRequests(Profile& profile, IResultParser& resultParser, PRINTF pPrintOut, PRINTF pPrintError, PRINTF pPrintVerbose, struct Synchronization *pSynch)
{
    g_pfnPrintOut = pPrintOut;
    g_pfnPrintError = pPrintError;
    g_pfnPrintVerbose = pPrintVerbose;

    bool fOk = _PrecreateFiles(profile);
    if (fOk)
    {
        const vector<TimeSpan>& vTimeSpans = profile.GetTimeSpans();
        vector<Results> vResults(vTimeSpans.size());
        for (size_t i = 0; fOk && (i < vTimeSpans.size()); i++)
        {
            printfv(profile.GetVerbose(), "Generating requests for timespan %u.\n", i + 1);
            fOk = _GenerateRequestsForTimeSpan(profile, vTimeSpans[i], vResults[i], pSynch);
        }

        // TODO: show results only for timespans that succeeded
        SystemInformation system;
        EtwResultParser::ParseResults(vResults);
        string sResults = resultParser.ParseResults(profile, system, vResults);
        print("%s", sResults.c_str());
    }

    return fOk;
}

That's because the start time is recorded in the SystemInformation constructor, but all of the benchmarking happens in _GenerateRequestsForTimeSpan.

It is misleading because the start time is now incorrect. It is delayed by however long the benchmark took to run.

Image

Am I understanding this correctly? Is the start time incorrect?

@DanPear

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions