LCOV - code coverage report
Current view: top level - utilities/source - cache_metric.cpp (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 0 5 0.0 %
Date: 2020-02-28 00:44:21 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Maurice Laveaux
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : #include "mcrl2/utilities/cache_metric.h"
      11             : #include <sstream>
      12             : 
      13             : using namespace mcrl2::utilities;
      14             : 
      15           0 : std::string cache_metric::message() const
      16             : {
      17           0 :   std::stringstream str;
      18           0 :   std::size_t total_count = m_hit_count + m_miss_count;
      19           0 :   str << m_hit_count << " times found out of " << total_count << " calls (" << static_cast<double>(m_hit_count) / static_cast<double>(m_miss_count) * 100 << " %)";
      20           0 :   return str.str();
      21             : }

Generated by: LCOV version 1.13