www.mooseframework.org
PerfNode.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "PerfNode.h"
11 
12 std::chrono::steady_clock::duration
14 {
15  return _total_time - childrenTime();
16 }
17 
18 std::chrono::steady_clock::duration
20 {
21  // Note that all of the children's time is already
22  // accounte for in the total time
23  return _total_time;
24 }
25 
26 std::chrono::steady_clock::duration
28 {
29  std::chrono::steady_clock::duration children_time(0);
30 
31  for (auto & child_it : _children)
32  children_time += child_it.second->totalTime();
33 
34  return children_time;
35 }
std::chrono::steady_clock::duration childrenTime() const
Get the time this nodes children took.
Definition: PerfNode.C:27
std::chrono::steady_clock::duration _total_time
The total elapsed time for this node.
Definition: PerfNode.h:116
std::chrono::steady_clock::duration totalTime() const
The time this Node plus all of it's children took.
Definition: PerfNode.C:19
std::map< PerfID, std::unique_ptr< PerfNode > > _children
Timers that are directly underneath this node.
Definition: PerfNode.h:122
std::chrono::steady_clock::duration selfTime() const
Get the time this node took.
Definition: PerfNode.C:13