tst_bench_{qhash,qset}: set deterministic seed

There's a lot of variation in the benchmark graphs for QHash
presumably caused by variation in seed.

Optimally we would set deterministic seed for all
benchmarks, but we don't know whether or not it is
one until the macro is reached.

Pick-to: 6.6 6.5
Change-Id: I4e412e4d4e2cc65eada94ed123243ed0047dd9cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aec39bd136defe9e6646b9edfcdd2f02d62471f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Mårten Nordheim 2024-01-19 13:30:42 +01:00 committed by Qt Cherry-pick Bot
parent 26f24693cd
commit 068d36dbc1
2 changed files with 8 additions and 0 deletions

View File

@ -55,6 +55,8 @@ private:
void tst_QHash::initTestCase()
{
QHashSeed::setDeterministicGlobalSeed();
// small list of strings (that happen to look like file paths produced long
// ago by cd ../.. && find . -print, but that's irrelevant).
QFile smallPathsData(QFINDTESTDATA("paths_small_data.txt"));

View File

@ -9,12 +9,18 @@ class tst_QSet : public QObject
Q_OBJECT
private slots:
void initTestCase();
void intersect_int_data();
void intersect_int();
void intersect_complexType_data();
void intersect_complexType();
};
void tst_QSet::initTestCase()
{
QHashSeed::setDeterministicGlobalSeed();
}
void tst_QSet::intersect_int_data()
{
QTest::addColumn<int>("lhsSize");