LCOV - code coverage report
Current view: top level - src/util - thread.cpp (source / functions) Hit Total Coverage
Test: coverage.lcov Lines: 8 14 57.1 %
Date: 2022-04-21 14:51:19 Functions: 1 1 100.0 %
Legend: Modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed

Not modified by patch:
Lines: hit not hit | Branches: + taken - not taken # not executed
Branches: 0 0 -

           Branch data     Line data    Source code
#       1                 :            : // Copyright (c) 2021 The Bitcoin Core developers
#       2                 :            : // Distributed under the MIT software license, see the accompanying
#       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#       4                 :            : 
#       5                 :            : #include <util/thread.h>
#       6                 :            : 
#       7                 :            : #include <logging.h>
#       8                 :            : #include <util/system.h>
#       9                 :            : #include <util/threadnames.h>
#      10                 :            : 
#      11                 :            : #include <exception>
#      12                 :            : 
#      13                 :            : void util::TraceThread(const char* thread_name, std::function<void()> thread_func)
#      14                 :       3973 : {
#      15                 :       3973 :     util::ThreadRename(thread_name);
#      16                 :       3973 :     try {
#      17                 :       3973 :         LogPrintf("%s thread start\n", thread_name);
#      18                 :       3973 :         thread_func();
#      19                 :       3973 :         LogPrintf("%s thread exit\n", thread_name);
#      20                 :       3973 :     } catch (const std::exception& e) {
#      21                 :          0 :         PrintExceptionContinue(&e, thread_name);
#      22                 :          0 :         throw;
#      23                 :          0 :     } catch (...) {
#      24                 :          0 :         PrintExceptionContinue(nullptr, thread_name);
#      25                 :          0 :         throw;
#      26                 :          0 :     }
#      27                 :       3973 : }

Generated by: LCOV version 0-eol-96201-ge66f56f4af6a