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 0 : }