From 349abfa386a1ad59eddd4ec98024e1d1a92ba139 Mon Sep 17 00:00:00 2001 From: nvalimak Date: Fri, 29 May 2009 14:39:23 +0000 Subject: [PATCH] LZ index support git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/TextCollection@421 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- testTextCollection.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testTextCollection.cpp b/testTextCollection.cpp index 166c019..82bf79e 100644 --- a/testTextCollection.cpp +++ b/testTextCollection.cpp @@ -40,14 +40,14 @@ int main() int i = 0 ,j = 0; int heap_base = HeapProfiler::GetHeapConsumption(); std::cerr << "Initial heap usage : " << heap_base << "\n"; - TextCollectionBuilder *tcb = new TextCollectionBuilder(32); + TextCollectionBuilder *tcb = new TextCollectionBuilder(5); heap_base = HeapProfiler::GetHeapConsumption (); std::cerr << "Heap usage after InitTextCollection : " << heap_base << "\n"; Tools::StartTimer(); while (not(cin.eof())){ - getline(cin,str); // Read line by line. -// cin >> str; // Read word by word. + getline(cin,str); // Read line by line. +// cin >> str; // Read word by word. data = (uchar *) str.c_str(); if (str.size() == 0) continue; @@ -86,14 +86,14 @@ int main() std::cout << "over bounds" << std::endl; delete [] temp;*/ - HeapProfiler::ResetMaxHeapConsumption(); std::cerr << "Creating new text collection with " << i << " strings (total " << j/1024 << " kb)\n"; + std::cerr << "max heap usage: " << HeapProfiler::GetMaxHeapConsumption()/(1024*1024) << " Mbytes" << std::endl; + HeapProfiler::ResetMaxHeapConsumption(); std::cerr << "Before MakeStatic() [press enter]\n"; //std::cin >> kbd; // This will print the maximum mem usage during construction time: - std::cerr << "max heap usage: " << HeapProfiler::GetMaxHeapConsumption()/(1024*1024) << " Mbytes" << std::endl; - TextCollection* tc = tcb->InitTextCollection(); + TextCollection* tc = tcb->InitTextCollection();//SXSI::TextStorage::TYPE_LZ_INDEX); delete tcb; tcb = 0; std::cerr << "After MakeStatic() [press enter]\n"; // This will print the maximum mem usage during MakeStatic(): -- 2.17.1