From 5fb9a6a9024eaf7b94f20eefcffce928adeaed78 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 8 Feb 2016 23:28:21 +0100 Subject: Gather more timings --- examples/dummyresource/resourcefactory.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'examples/dummyresource') diff --git a/examples/dummyresource/resourcefactory.cpp b/examples/dummyresource/resourcefactory.cpp index 36866ec..48858da 100644 --- a/examples/dummyresource/resourcefactory.cpp +++ b/examples/dummyresource/resourcefactory.cpp @@ -95,12 +95,17 @@ Sink::ApplicationDomain::Folder::Ptr DummyResource::createFolder(const QByteArra void DummyResource::synchronize(const QByteArray &bufferType, const QMap > &data, Sink::Storage::Transaction &transaction, Sink::Storage::Transaction &synchronizationTransaction, DomainTypeAdaptorFactoryInterface &adaptorFactory, std::function &data, Sink::Storage::Transaction &)> createEntity) { + auto time = QSharedPointer::create(); + time->start(); //TODO find items to remove + int count = 0; for (auto it = data.constBegin(); it != data.constEnd(); it++) { + count++; const auto remoteId = it.key().toUtf8(); auto entity = createEntity(remoteId, it.value(), synchronizationTransaction); createOrModify(transaction, synchronizationTransaction, adaptorFactory, bufferType, remoteId, *entity); } + Trace() << "Sync of " << count << " entities of type " << bufferType << " done." << Sink::Log::TraceTime(time->elapsed()); } KAsync::Job DummyResource::synchronizeWithSource(Sink::Storage &mainStore, Sink::Storage &synchronizationStore) -- cgit v1.2.3