64 SST_ELI_REGISTER_PROFILETOOL(
69 SST_ELI_ELEMENT_VERSION(0, 1, 0),
70 "Profiler that will count calls to sync"
77 void syncManagerStart(
bool ranksync)
override;
79 void updateSyncSize(
size_t bytes,
size_t events)
override;
84 uint64_t syncmanager_count = 0;
85 uint64_t threadsync_count_ = 0;
86 uint64_t events_exchanged_ = 0;
87 uint64_t bytes_exchanged_ = 0;
98 SyncProfileToolTime(
const std::string& name,
Params& params);
100 virtual ~SyncProfileToolTime() {}
102 void syncManagerStart(
bool ranksync)
override
104 start_time_ = T::now();
105 rank_sync_ = ranksync;
108 void syncManagerEnd()
override
110 auto total_time = T::now() - start_time_;
114 threadsync_time += std::chrono::duration_cast<std::chrono::nanoseconds>(total_time).count();
117 syncmanager_time += std::chrono::duration_cast<std::chrono::nanoseconds>(total_time).count();
122 void updateSyncSize(
size_t bytes,
size_t events)
override
124 bytes_exchanged_ += bytes;
125 events_exchanged_ += events;
131 uint64_t syncmanager_time = 0;
132 uint64_t syncmanager_count = 0;
133 uint64_t threadsync_count = 0;
134 uint64_t threadsync_time = 0;
135 uint64_t events_exchanged_ = 0;
136 uint64_t bytes_exchanged_ = 0;
137 bool rank_sync_ =
false;
139 typename T::time_point start_time_;