VirtualBox

Ignore:
Timestamp:
Oct 18, 2021 1:45:07 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147614
Message:

Audio/Validation Kit: Log last successful writes to backends. ​bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkatCommon.cpp

    r91655 r91826  
    557557        uint64_t        nsTimeout          = RT_MS_5MIN_64 * RT_NS_1MS;
    558558        uint64_t        nsLastMsgCantWrite = 0; /* Timestamp (in ns) when the last message of an unwritable stream was shown. */
     559        uint64_t        nsLastWrite        = 0;
    559560
    560561        while (cbPlayedTotal < cbToPlayTotal)
    561562        {
    562563            uint64_t const nsNow = RTTimeNanoTS();
     564            if (!nsLastWrite)
     565                nsLastWrite = nsNow;
    563566
    564567            /* Pace ourselves a little. */
     
    641644                            if (cbPlayed != cbToPlay)
    642645                                RTTestFailed(g_hTest, "Only played %RU32/%RU32 bytes", cbPlayed, cbToPlay);
     646
     647                            if (cbPlayed)
     648                                nsLastWrite = nsNow;
    643649                        }
    644650                    }
     
    654660                RTMSINTERVAL const msSleep = RT_MIN(RT_MAX(1, pStream->Cfg.Device.cMsSchedulingHint), 256);
    655661
    656                 if (!nsLastMsgCantWrite || nsNow - nsLastMsgCantWrite > RT_NS_10SEC) /* Don't spam the output too much. */
     662                if (   !nsLastMsgCantWrite
     663                    || nsNow - nsLastMsgCantWrite > RT_NS_10SEC) /* Don't spam the output too much. */
    657664                {
    658                     RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Waiting %RU32ms for stream to be writable again ...\n", msSleep);
     665                    RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS, "Waiting %RU32ms for stream to be writable again (last write %RU64ns ago) ...\n",
     666                                 msSleep, nsNow - nsLastWrite);
    659667                    nsLastMsgCantWrite = nsNow;
    660668                }
Note: See TracChangeset for help on using the changeset viewer.

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