1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-22 02:02:10 +02:00
falkonOfficial/tests/benchmarks/benchmarks.pro
nowrep db664184d0 [AdBlock] Improved performance of loading rules
Don't use regexps for parsing rules.
Added benchmark for loading subscriptions

Before:

********* Start testing of AdBlockParseRule *********
Config: Using QTest library 4.8.6, Qt 4.8.6
PASS   : AdBlockParseRule::initTestCase()
RESULT : AdBlockParseRule::parseEasyList():
     596.3 msecs per iteration (total: 2,982, iterations: 5)
PASS   : AdBlockParseRule::parseEasyList()
PASS   : AdBlockParseRule::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of AdBlockParseRule *********

After:

********* Start testing of AdBlockParseRule *********
Config: Using QTest library 4.8.6, Qt 4.8.6
PASS   : AdBlockParseRule::initTestCase()
RESULT : AdBlockParseRule::parseEasyList():
     481.8 msecs per iteration (total: 2,409, iterations: 5)
PASS   : AdBlockParseRule::parseEasyList()
PASS   : AdBlockParseRule::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of AdBlockParseRule *********
2014-04-06 13:36:42 +02:00

20 lines
496 B
Prolog

TEMPLATE = subdirs
include(benchmarks.pri)
defineTest(addSubdir) {
for(subdir, 1) {
entries = $$files($$subdir/*)
for(entry, entries) {
fullPath = $$replace(entry, ;,"")
fullPath = $$replace(fullPath, \\\\, /)
name = $$replace(fullPath, $$re_escape("$$subdir/"), "")
os2|win32: fullPath = $$lower($$fullPath)
exists($$fullPath/*.pro): SUBDIRS += $$fullPath
}
}
export (SUBDIRS)
}
addSubdir($$PWD)