-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding arbitrary information to execution graph (#166)
* add call records and tests * formatting * disable tracing by default during tests * re-factor to be used depending on message flag, change the message layout and rename to ExecGraphDetail * update comments * refactor after offline discussion * don't log chained calls if recording exec graph is not set * quick test fix * add serialisation for maps * fix tests * self-review * refactor thread local message's name * move mpi exec graph tests to separate file * add checks for serialisation/deserialisation * cleanup
- Loading branch information
1 parent
dc3d150
commit 832aafe
Showing
18 changed files
with
348 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include <faabric/proto/faabric.pb.h> | ||
|
||
#include <functional> | ||
#include <list> | ||
#include <map> | ||
|
||
namespace faabric::util::exec_graph { | ||
void addDetail(faabric::Message& msg, | ||
const std::string& key, | ||
const std::string& value); | ||
|
||
void incrementCounter(faabric::Message& msg, | ||
const std::string& key, | ||
const int valueToIncrement = 1); | ||
|
||
static inline std::string const mpiMsgCountPrefix = "mpi-msgcount-torank-"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ faabric_lib(util | |
crash.cpp | ||
delta.cpp | ||
environment.cpp | ||
exec_graph.cpp | ||
files.cpp | ||
func.cpp | ||
gids.cpp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <faabric/util/exec_graph.h> | ||
#include <faabric/util/logging.h> | ||
#include <faabric/util/testing.h> | ||
|
||
namespace faabric::util::exec_graph { | ||
void addDetail(faabric::Message& msg, | ||
const std::string& key, | ||
const std::string& value) | ||
{ | ||
if (!msg.recordexecgraph()) { | ||
return; | ||
} | ||
|
||
auto& stringMap = *msg.mutable_execgraphdetails(); | ||
|
||
stringMap[key] = value; | ||
} | ||
|
||
void incrementCounter(faabric::Message& msg, | ||
const std::string& key, | ||
const int valueToIncrement) | ||
{ | ||
if (!msg.recordexecgraph()) { | ||
return; | ||
} | ||
|
||
auto& stringMap = *msg.mutable_intexecgraphdetails(); | ||
|
||
stringMap[key] += valueToIncrement; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.