Skip to content

Commit

Permalink
#2302: Remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrepebay committed Dec 12, 2024
1 parent bb2167a commit b875573
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/collection/do_flops_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ struct GenericWork : vt::Collection<GenericWork, vt::Index1D> {
fmt::print("-- Starting Iteration --\n");

vt::theContext()->getTask()->startMetrics();

// ----------------------------------------------------------
// test non packed double precision floating point operations
// should result in ~4*n of these operations
Expand Down
4 changes: 2 additions & 2 deletions src/vt/metrics/perf_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ std::unordered_map<std::string, uint64_t> PerfData::getTaskMeasurements() {
if (bytesRead == sizeof(count)) {
measurements[event_names_[i]] = count;
} else if (bytesRead == -1) {
vtAbort("Failed to read perf event data for: " + event_names_[i] +
vtAbort("Failed to read perf event data for: " + event_names_[i] +
". Error: " + std::strerror(errno));
} else {
vtAbort("Incomplete read for: " + event_names_[i] +
vtAbort("Incomplete read for: " + event_names_[i] +
". Expected " + std::to_string(sizeof(count)) +
" bytes, but got " + std::to_string(bytesRead));
}
Expand Down
4 changes: 2 additions & 2 deletions src/vt/runnable/runnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ struct RunnableNew {

/**
* \brief Stop metrics associated to this runnable for the running context
*
*
* \note has to be called after startMetrics
*
*
*/
void stopMetrics();

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/metrics/test_perf_data.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@ double pi(uint64_t n) {

TEST_F(TestPerfData, DefaultEventName) {
unsetenv("VT_EVENTS");

vt::metrics::PerfData perf_data;

auto event_map = perf_data.getEventMap();

ASSERT_NE(event_map.find("instructions"), event_map.end())
<< "Default event 'instructions' should be in the event map.";
}

TEST_F(TestPerfData, ValidCustomEventNames) {
setenv("VT_EVENTS", "instructions,cache_references", 1);

vt::metrics::PerfData perf_data;

auto event_map = perf_data.getEventMap();
Expand All @@ -98,7 +98,7 @@ TEST_F(TestPerfData, StartAndStopTaskMeasurement) {
setenv("VT_EVENTS", "instructions", 1);

vt::metrics::PerfData perf_data;

EXPECT_NO_THROW(perf_data.startTaskMeasurement())
<< "startTaskMeasurement() should not throw an exception.";
EXPECT_NO_THROW(perf_data.stopTaskMeasurement())
Expand Down

0 comments on commit b875573

Please sign in to comment.