Loading...
Searching...
No Matches
executionStatsProcessor.h
Go to the documentation of this file.
1//
2// Copyright 2025 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_EXEC_VDF_EXECUTION_STATS_PROCESSOR_H
8#define PXR_EXEC_VDF_EXECUTION_STATS_PROCESSOR_H
9
11
12#include "pxr/pxr.h"
13
14#include "pxr/exec/vdf/api.h"
16#include "pxr/exec/vdf/types.h"
17
18#include <optional>
19#include <thread>
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23class VDF_API_TYPE VdfExecutionStatsProcessor
24{
25public:
26
29 typedef std::thread::id ThreadId;
30
33 VDF_API
34 virtual ~VdfExecutionStatsProcessor();
35
39 VDF_API
40 void Process(const VdfExecutionStats* stats);
41
50 VDF_API
51 const VdfNetwork* GetNetwork() const;
52
53protected:
56 VDF_API
57 VdfExecutionStatsProcessor();
58
62 virtual void _ProcessEvent(
63 ThreadId threadId,
64 const VdfExecutionStats::Event& event) = 0;
65
73 virtual void _ProcessSubStat(const VdfExecutionStats* subStat) = 0;
74
78 virtual void _PreProcess() {}
79
83 virtual void _PostProcess() {}
84
85private:
91 VDF_API
92 void _ProcessEvents(const VdfExecutionStats* stats);
93
96 VDF_API
97 void _ProcessSubStats(const VdfExecutionStats* stats);
98
99private:
100 const VdfNetwork* _network;
101 std::optional<VdfId> _invokingNodeId;
102};
103
104PXR_NAMESPACE_CLOSE_SCOPE
105
106#endif /* VDF_EXECUTION_STATS_PROCESSOR */
Execution stats profiling event logger.
A VdfNetwork is a collection of VdfNodes and their connections.
Definition: network.h:60
Execution Stats event.