summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmarks')
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
index 2e63795978..594e5b7478 100644
--- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp
+++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp
@@ -52,6 +52,8 @@ class qfileinfo : public QObject
{
Q_OBJECT
private slots:
+ void existsTemporary();
+ void existsStatic();
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
void symLinkTargetPerformanceLNK();
void symLinkTargetPerformanceMounpoint();
@@ -70,6 +72,18 @@ void qfileinfo::cleanupTestCase()
{
}
+void qfileinfo::existsTemporary()
+{
+ QString appPath = QCoreApplication::applicationFilePath();
+ QBENCHMARK { QFileInfo(appPath).exists(); }
+}
+
+void qfileinfo::existsStatic()
+{
+ QString appPath = QCoreApplication::applicationFilePath();
+ QBENCHMARK { QFileInfo::exists(appPath); }
+}
+
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
void qfileinfo::symLinkTargetPerformanceLNK()
{