Hash :
1f69f580
Author :
Date :
2022-11-18T14:33:20
Perf tests: Add --fixed-test-time-with-warmup Warmup trials combined with fixed-test-time was broken recently. It was already fragile and only worked when parameters were provided in the right order. On Android we're relying on this combination to get steady results without hitting thermal limits. To address this: - Add a new parameter that encapsulates the combination - ASSERT that flags aren't provided in unsupported combinations Test: python3 restricted_trace_perf.py --fixedtime 10 Bug: angleproject:7755 Change-Id: I56fce1f65d4f0538e623951163a9c8736cb3fb03 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4027282 Reviewed-by: Roman Lavrov <romanl@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ANGLEPerfTestArgs.h:
// Command line arguments for angle_perftests.
//
#ifndef TESTS_PERF_TESTS_ANGLE_PERF_TEST_ARGS_H_
#define TESTS_PERF_TESTS_ANGLE_PERF_TEST_ARGS_H_
#include <string>
#include <vector>
#include "common/Optional.h"
namespace angle
{
extern bool gCalibration;
extern int gStepsPerTrial;
extern int gMaxStepsPerformed;
extern bool gEnableTrace;
extern const char *gTraceFile;
extern const char *gScreenshotDir;
extern bool gSaveScreenshots;
extern int gScreenshotFrame;
extern bool gVerboseLogging;
extern int gWarmupTrials;
extern int gWarmupSteps;
extern int gCalibrationTimeSeconds;
extern int gTrialTimeSeconds;
extern int gTestTrials;
extern bool gNoFinish;
extern bool gRetraceMode;
extern bool gMinimizeGPUWork;
extern bool gTraceTestValidation;
extern bool gTraceInterpreter;
extern const char *gPerfCounters;
extern const char *gUseANGLE;
extern const char *gUseGL;
extern bool gOffscreen;
extern bool gVsync;
extern const char *gPrintExtensionsToFile;
extern const char *gRequestedExtensions;
// Use this flag as an indicator that a trace's frame count should be used for warmup steps
constexpr int kAllFrames = -1;
inline bool OneFrame()
{
return gStepsPerTrial == 1 || gMaxStepsPerformed == 1;
}
} // namespace angle
#endif // TESTS_PERF_TESTS_ANGLE_PERF_TEST_ARGS_H_