Commit c1db3cdc authored by Milian Wolff's avatar Milian Wolff
Browse files

Reduce API surface of BasicSetRepository

Remove unused mutex getter and only forward statistics instead of
the full internal item repository.
parent b81a0416
......@@ -572,7 +572,7 @@ uint collectNaiveNodeCount(uint currentNode)
void TestDUChain::testImportStructure()
{
Timer total;
qDebug() << "before: " << KDevelop::RecursiveImportRepository::repository()->dataRepository().statistics().print();
qDebug() << "before: " << KDevelop::RecursiveImportRepository::repository()->statistics().print();
///Maintains a naive import-structure along with a real top-context import structure, and allows comparing both.
int cycles = 5;
......@@ -631,14 +631,14 @@ void TestDUChain::testImportStructure()
}
qDebug() << "after: " <<
KDevelop::RecursiveImportRepository::repository()->dataRepository().statistics().print();
KDevelop::RecursiveImportRepository::repository()->statistics().print();
for (int a = 0; a < contextCount; ++a)
delete allContexts[a];
allContexts.clear();
qDebug() << "after cleanup: " <<
KDevelop::RecursiveImportRepository::repository()->dataRepository().statistics().print();
KDevelop::RecursiveImportRepository::repository()->statistics().print();
}
qDebug() << "total ns needed for import-structure test:" << float( total.elapsed());
......
......@@ -295,6 +295,10 @@ public:
Set createSet(Index i);
void printStatistics() const;
SetDataRepository::Statistics statistics() const
{
return m_dataRepository.statistics();
}
///Is called when this index is not part of any set any more
virtual void itemRemovedFromSets(uint index);
......@@ -310,17 +314,6 @@ public:
return nullptr;
}
inline QMutex* mutex() const
{
return m_mutex;
}
///Only public to get statistics and such
const SetDataRepository& dataRepository() const
{
return m_dataRepository;
}
///Set whether set-nodes with reference-count zero should be deleted only after a delay
///The default is true.
///This may be faster when the structure is large anyway and many temporary sets
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment