SST 16.0.0
Structural Simulation Toolkit
timingOutput.h
1// Copyright 2009-2026 NTESS. Under the terms
2// of Contract DE-NA0003525 with NTESS, the U.S.
3// Government retains certain rights in this software.
4//
5// Copyright (c) 2009-2026, NTESS
6// All rights reserved.
7//
8// This file is part of the SST software package. For license
9// information, see the LICENSE file in the top level directory of the
10// distribution.
11
12#ifndef SST_CORE_TIMING_OUTPUT_H
13#define SST_CORE_TIMING_OUTPUT_H
14
15#include "sst/core/output.h"
16#include "sst/core/unitAlgebra.h"
17#include "sst/core/util/filesystem.h"
18
19#include <cstdint>
20#include <cstdio>
21#include <map>
22#include <string>
23
24
25namespace SST {
26namespace Util {
27class PerfReporter;
28}
29
30namespace Core {
31
32
33/**
34 * Outputs configuration data to a specified file path.
35 */
36class TimingOutput
37{
38public:
39 /** Timing Parameters
40 */
41 enum Key {
42 LOCAL_MAX_RSS, // Max Resident Set Size (kB)
43 GLOBAL_MAX_RSS, // Approx. Global Max RSS Size (kB)
44 LOCAL_MAX_PF, // Max Local Page Faults
45 GLOBAL_PF, // Global Page Faults
46 GLOBAL_MAX_IO_IN, // Max Output Blocks
47 GLOBAL_MAX_IO_OUT, // Max Input Blocks
48 GLOBAL_MAX_SYNC_DATA_SIZE, // Max Sync data size
49 GLOBAL_SYNC_DATA_SIZE, // Global Sync data size
50 MAX_MEMPOOL_SIZE, // Max mempool usage (bytes)
51 GLOBAL_MEMPOOL_SIZE, // Global mempool usage (bytes)
52 MAX_BUILD_TIME, // Build time (wallclock seconds)
53 MAX_RUN_TIME, // Run loop time (wallclock seconds)
54 MAX_TOTAL_TIME, // Total time (wallclock seconds)
55 SIMULATED_TIME_UA, // Simulated time ( Algebra seconds string. eg. "10 us" )
56 GLOBAL_ACTIVE_ACTIVITIES, // Global active activities
57 GLOBAL_CURRENT_TV_DEPTH, // Current global TimeVortex depth
58 GLOBAL_MAX_TV_DEPTH, // Max TimeVortex depth
59 RANKS, // MPI ranks
60 THREADS, // Threads
61 };
62
63 TimingOutput(const SST::Output& output, int print_verbosity);
64 virtual ~TimingOutput();
65 void generate(SST::Util::PerfReporter* reporter);
66
67 void set(Key key, uint64_t v);
68 void set(Key key, UnitAlgebra v);
69 void set(Key key, double v);
70
71private:
72 SST::Output output_;
73 int print_verbosity_;
74
75 std::map<Key, uint64_t> u64map_ = {};
76 std::map<Key, UnitAlgebra> uamap_ = {};
77 std::map<Key, double> dmap_ = {};
78};
79} // namespace Core
80} // namespace SST
81
82#endif // SST_CORE_TIMING_OUTPUT_H
Outputs configuration data to a specified file path.
Definition timingOutput.h:37
Key
Timing Parameters.
Definition timingOutput.h:41
Output object provides consistent method for outputting data to stdout, stderr and/or sst debug file.
Definition output.h:58
Performs Unit math in full precision.
Definition unitAlgebra.h:107
Definition perfReporter.h:97