Better log output on indexing.

This commit is contained in:
Yury Melnichek 2011-02-08 00:29:02 +01:00 committed by Alex Zolotarev
parent 8c8bd4b1f5
commit 2d794703fd

View file

@ -165,20 +165,21 @@ inline void IndexScales(FeaturesVectorT const & featuresVector,
SorterType sorter(1024*1024, tmpFilePrefix + ".c2f.tmp", out);
*/
featuresVector.ForEachOffset(FeatureCoverer<SorterType>(bucket, sorter, numFeatures));
LOG(LINFO, ("Sorting..."));
// LOG(LINFO, ("Sorting..."));
sorter.SortAndFinish();
}
LOG(LINFO, ("Indexing..."));
// LOG(LINFO, ("Indexing..."));
{
FileReader reader(tmpFilePrefix + ".c2f.sorted");
uint64_t const numCells = reader.Size() / sizeof(CellFeaturePair);
DDVector<CellFeaturePair, FileReader, uint64_t> cellsToFeatures(reader, numCells);
LOG(LINFO, ("Being indexed", "features:", numFeatures, "cells:", numCells));
LOG(LINFO, ("Being indexed", "features:", numFeatures, "cells:", numCells,
"cells per feature:", (numCells + 1.0) / (numFeatures + 1.0)));
SubWriter<WriterT> subWriter(writer);
BuildIntervalIndex<5>(cellsToFeatures.begin(), cellsToFeatures.end(), subWriter);
}
FileWriter::DeleteFile(tmpFilePrefix + ".c2f.sorted");
LOG(LINFO, ("Indexing done."));
// LOG(LINFO, ("Indexing done."));
recordWriter.FinishRecord();
}
LOG(LINFO, ("All scale indexes done."));