# HG changeset patch # User Chris Cannam # Date 1483626649 0 # Node ID f5f83fb49852071d399553d0510591e957b1f6f8 # Parent df59bf0b42362b4ba7e54da4232fc72a6bdf8f23 More cache hit counts; make debug output from colour 3d plot renderer (even though it is to SVDEBUG) appear only with explicit debug flag diff -r df59bf0b4236 -r f5f83fb49852 data/model/Dense3DModelPeakCache.cpp --- a/data/model/Dense3DModelPeakCache.cpp Thu Jan 05 11:10:38 2017 +0000 +++ b/data/model/Dense3DModelPeakCache.cpp Thu Jan 05 14:30:49 2017 +0000 @@ -17,6 +17,8 @@ #include "base/Profiler.h" +#include "base/HitCount.h" + Dense3DModelPeakCache::Dense3DModelPeakCache(const DenseThreeDimensionalModel *source, int columnsPerPeak) : m_source(source), @@ -44,7 +46,6 @@ Dense3DModelPeakCache::Column Dense3DModelPeakCache::getColumn(int column) const { - Profiler profiler("Dense3DModelPeakCache::getColumn"); if (!m_source) return Column(); if (!haveColumn(column)) fillColumn(column); return m_cache->getColumn(column); @@ -79,7 +80,14 @@ bool Dense3DModelPeakCache::haveColumn(int column) const { - return in_range_for(m_coverage, column) && m_coverage[column]; + static HitCount count("Dense3DModelPeakCache"); + if (in_range_for(m_coverage, column) && m_coverage[column]) { + count.hit(); + return true; + } else { + count.miss(); + return false; + } } void