Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117877616
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/file/tests/CMakeLists.txt b/src/file/tests/CMakeLists.txt
index 9254e9be..e278b011 100644
--- a/src/file/tests/CMakeLists.txt
+++ b/src/file/tests/CMakeLists.txt
@@ -1,62 +1,65 @@
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
)
add_executable(indexerconfigtest
indexerconfigtest.cpp)
target_link_libraries(indexerconfigtest
Qt5::Core
KF5::CoreAddons
KF5::ConfigCore
KF5::Baloo
baloofilecommon
)
add_executable(basicindexingqueuetest-manual
basicindexingqueuetest.cpp
)
target_link_libraries(basicindexingqueuetest-manual
Qt5::Core
Qt5::Sql
KF5::FileMetaData
KF5::KIOCore
KF5::ConfigCore
${XAPIAN_LIBRARIES}
KF5::Baloo
KF5::BalooXapian
baloofilecommon
)
add_executable(fileindexingqueuetest-manual
fileindexingqueuetest.cpp
fileextractor.cpp
)
target_link_libraries(fileindexingqueuetest-manual
Qt5::Core
Qt5::Sql
KF5::FileMetaData
KF5::KIOCore
KF5::ConfigCore
${XAPIAN_LIBRARIES}
KF5::Baloo
KF5::BalooXapian
baloofilecommon
)
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
if(BUILD_KINOTIFY)
add_executable(inotifytest inotify.cpp ../kinotify.cpp)
target_link_libraries(inotifytest
Qt5::Core
)
endif()
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")
#
# Storage Devices
#
add_executable(storagedevicestest storagedevicestest.cpp)
target_link_libraries(storagedevicestest Qt5::Core KF5::Solid baloofilecommon)
+
+add_executable(filtereddiriteratorbenchmark filtereddiriteratorbenchmark.cpp)
+target_link_libraries(filtereddiriteratorbenchmark Qt5::Core baloofilecommon)
diff --git a/src/file/tests/filtereddiriteratorbenchmark.cpp b/src/file/tests/filtereddiriteratorbenchmark.cpp
new file mode 100644
index 00000000..dd2a4a34
--- /dev/null
+++ b/src/file/tests/filtereddiriteratorbenchmark.cpp
@@ -0,0 +1,48 @@
+/*
+ * This file is part of the KDE Baloo Project
+ * Copyright (C) 2014 Vishesh Handa <me@vhanda.in>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <QCoreApplication>
+#include <QTime>
+#include <iostream>
+
+#include "../filtereddiriterator.h"
+#include "../fileindexerconfig.h"
+
+using namespace Baloo;
+
+int main(int argc, char** argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QTime timer;
+ timer.start();
+
+ FileIndexerConfig config;
+ for (const QString& dir : config.includeFolders()) {
+ FilteredDirIterator it(&config, dir);
+ while (!it.next().isEmpty()) {
+ }
+ }
+
+ std::cout << "Elapsed: " << timer.elapsed() << std::endl;
+ return 0;
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Apr 5, 9:34 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831259
Default Alt Text
(3 KB)
Attached To
Mode
rKB baloo
Attached
Detach File
Event Timeline