mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Test: Ensure that ioctl statistics test is deterministic
Related-To: NEO-6537 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
91840e6e07
commit
1b1c06746f
@ -256,6 +256,17 @@ TEST_F(DrmFailedIoctlTests, givenPrintIoctlEntriesWhenCallFailedIoctlThenExpecte
|
||||
TEST_F(DrmSimpleTests, givenPrintIoctlTimesWhenCallIoctlThenStatisticsAreGathered) {
|
||||
struct DrmMock : public Drm {
|
||||
using Drm::ioctlStatistics;
|
||||
|
||||
int ioctl(unsigned long request, void *arg) override {
|
||||
auto start = std::chrono::steady_clock::now();
|
||||
std::chrono::steady_clock::time_point end;
|
||||
|
||||
do {
|
||||
end = std::chrono::steady_clock::now();
|
||||
} while (std::chrono::duration_cast<std::chrono::nanoseconds>(end - start).count() == 0);
|
||||
|
||||
return Drm::ioctl(request, arg);
|
||||
}
|
||||
};
|
||||
|
||||
constexpr long long initialMin = std::numeric_limits<long long>::max();
|
||||
|
Reference in New Issue
Block a user