Skip to content

Commit 5c1a8e6

Browse files
ahmd-kfacebook-github-bot
authored andcommitted
CollTrace Scuba Logging for Dashboard (#8)
Summary: D82675147 got reverted because of conflict with NCCLX OSS. In this new version, we fix this by not importing RCCLX code into the common folder. Differential Revision: D85305175
1 parent 4349c50 commit 5c1a8e6

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

comms/utils/logger/ScubaLogger.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ void NcclScubaEvent::record() {
6767
ncclLogToScuba(type_, copySample);
6868
}
6969

70+
void NcclScubaEvent::record(const std::string& stage) {
71+
if (!stage.empty()) {
72+
sample_.addNormal("stage", stage);
73+
}
74+
record();
75+
}
76+
7077
void NcclScubaEvent::setLogMetatData(const CommLogData* logMetaData) {
7178
sample_.setCommunicatorMetadata(logMetaData);
7279
}

comms/utils/logger/ScubaLogger.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
#include "comms/utils/logger/EventMgr.h"
1313
#include "comms/utils/logger/NcclScubaSample.h"
1414

15-
class NcclScubaEvent {
16-
public:
15+
struct NcclScubaEvent {
1716
void startAndRecord();
1817
void stopAndRecord();
1918
void lapAndRecord(const std::string& stage = "");
2019
void record();
20+
void record(const std::string& stage);
2121
void setLogMetatData(const CommLogData* logMetaData);
2222

2323
explicit NcclScubaEvent(const std::string& stage);
@@ -26,7 +26,6 @@ class NcclScubaEvent {
2626

2727
NcclScubaEvent(const std::string& stage, const CommLogData* logMetaData);
2828

29-
private:
3029
NcclScubaSample sample_;
3130
folly::stop_watch<std::chrono::microseconds> timer_;
3231
std::string stage_{};

0 commit comments

Comments
 (0)