OSDN Git Service

new qRandomUuid() function
authorIvailo Monev <xakepa10@gmail.com>
Tue, 22 Mar 2022 09:39:22 +0000 (11:39 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 22 Mar 2022 09:50:06 +0000 (11:50 +0200)
commita6eb4e38171b0c5d041732e07ad86cdfc69b2b91
tree58416e75e98e141bcbd2cae7be075b933afcb891
parent43dad8b2455bc4cfb7b19906818a9cb258e68cd9
new qRandomUuid() function

benchmark result:
********* Start testing of tst_bench_QUuid *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_bench_QUuid::initTestCase()
RESULT   : tst_bench_QUuid::qRandomUuid_vs_createUuid():"qRandomUuid()":
     97.821250 CPU ticks per iteration (total: 19,564,250, iterations: 200000)
RESULT   : tst_bench_QUuid::qRandomUuid_vs_createUuid():"QUuid::createUuid":
     108.41198 CPU ticks per iteration (total: 21,682,396, iterations: 200000)
PASS  : tst_bench_QUuid::qRandomUuid_vs_createUuid()
RESULT   : tst_bench_QUuid::createUuid():
     57.377920 CPU ticks per iteration (total: 11,475,584, iterations: 200000)
PASS  : tst_bench_QUuid::createUuid()
RESULT   : tst_bench_QUuid::fromChar():
     81.606610 CPU ticks per iteration (total: 16,321,322, iterations: 200000)
PASS  : tst_bench_QUuid::fromChar()
RESULT   : tst_bench_QUuid::toString():
     79.527925 CPU ticks per iteration (total: 15,905,585, iterations: 200000)
PASS  : tst_bench_QUuid::toString()
RESULT   : tst_bench_QUuid::fromString():
     78.037890 CPU ticks per iteration (total: 15,607,578, iterations: 200000)
PASS  : tst_bench_QUuid::fromString()
RESULT   : tst_bench_QUuid::toByteArray():
     78.505810 CPU ticks per iteration (total: 15,701,162, iterations: 200000)
PASS  : tst_bench_QUuid::toByteArray()
RESULT   : tst_bench_QUuid::fromByteArray():
     79.680680 CPU ticks per iteration (total: 15,936,136, iterations: 200000)
PASS  : tst_bench_QUuid::fromByteArray()
RESULT   : tst_bench_QUuid::toRfc4122():
     62.749495 CPU ticks per iteration (total: 12,549,899, iterations: 200000)
PASS  : tst_bench_QUuid::toRfc4122()
RESULT   : tst_bench_QUuid::fromRfc4122():
     7.604070 CPU ticks per iteration (total: 1,520,814, iterations: 200000)
PASS  : tst_bench_QUuid::fromRfc4122()
RESULT   : tst_bench_QUuid::toDataStream():
     100.19905 CPU ticks per iteration (total: 20,039,811, iterations: 200000)
PASS  : tst_bench_QUuid::toDataStream()
RESULT   : tst_bench_QUuid::fromDataStream():
     68.303560 CPU ticks per iteration (total: 13,660,712, iterations: 200000)
PASS  : tst_bench_QUuid::fromDataStream()
RESULT   : tst_bench_QUuid::isNull():
     6.075315 CPU ticks per iteration (total: 1,215,063, iterations: 200000)
PASS  : tst_bench_QUuid::isNull()
RESULT   : tst_bench_QUuid::operatorLess():
     18.49353 CPU ticks per iteration (total: 3,698,706, iterations: 200000)
PASS  : tst_bench_QUuid::operatorLess()
RESULT   : tst_bench_QUuid::operatorMore():
     18.51902 CPU ticks per iteration (total: 3,703,804, iterations: 200000)
PASS  : tst_bench_QUuid::operatorMore()
PASS  : tst_bench_QUuid::cleanupTestCase()
Totals: 16 passed, 0 failed, 0 skipped
********* Finished testing of tst_bench_QUuid *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qbytearray.cpp
src/core/tools/qbytearray.h
tests/benchmarks/core/plugin/quuid/tst_quuid.cpp