LCOV - code coverage report
Current view: top level - src/utils - PerfGuard.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 8 8 100.0 %
Date: 2026-05-29 20:35:17 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "PerfGuard.h"
      11             : #include "PerfGraph.h"
      12             : #ifdef LIBMESH_HAVE_NVTX_API
      13             : #include "nvtx3/nvtx3.hpp"
      14             : #endif
      15             : 
      16    85842674 : PerfGuard::PerfGuard(PerfGraph & graph, const PerfID id) : _graph(graph)
      17             : {
      18    85842674 :   _graph.push(id);
      19             : #ifdef LIBMESH_HAVE_NVTX_API
      20     1628600 :   nvtxRangePushA(moose::internal::getPerfGraphRegistry().sectionInfo(id)._name.c_str());
      21             : #endif
      22    85842674 : }
      23             : 
      24    85828289 : PerfGuard::~PerfGuard()
      25             : {
      26    85828289 :   _graph.pop();
      27             : #ifdef LIBMESH_HAVE_NVTX_API
      28     1628600 :   nvtxRangePop();
      29             : #endif
      30    85828289 : }

Generated by: LCOV version 1.14