Loading src/proto/mpi/message.hpp +11 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,17 @@ struct fmt::formatter<cargo::shaper_message> : formatter<std::string_view> { } }; template <> struct fmt::formatter<cargo::shaper_message> : formatter<std::string_view> { // parse is inherited from formatter<string_view>. template <typename FormatContext> auto format(const cargo::shaper_message& s, FormatContext& ctx) const { const auto str = fmt::format("{{tid: {}, shaping: {}}}", s.tid(), s.shaping()); return formatter<std::string_view>::format(str, ctx); } }; template <> struct fmt::formatter<cargo::shutdown_message> : formatter<std::string_view> { // parse is inherited from formatter<string_view>. Loading src/worker/worker.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,16 @@ worker::run() { break; } case tag::bw_shaping: { shaper_message m; world.recv(msg->source(), msg->tag(), m); LOGGER_INFO("msg => from: {} body: {}", msg->source(), m); // TODO: Do something with m.shaping; break; } case tag::shutdown: LOGGER_INFO("msg => from: {} body: {{shutdown}}", msg->source()); Loading Loading
src/proto/mpi/message.hpp +11 −0 Original line number Diff line number Diff line Loading @@ -250,6 +250,17 @@ struct fmt::formatter<cargo::shaper_message> : formatter<std::string_view> { } }; template <> struct fmt::formatter<cargo::shaper_message> : formatter<std::string_view> { // parse is inherited from formatter<string_view>. template <typename FormatContext> auto format(const cargo::shaper_message& s, FormatContext& ctx) const { const auto str = fmt::format("{{tid: {}, shaping: {}}}", s.tid(), s.shaping()); return formatter<std::string_view>::format(str, ctx); } }; template <> struct fmt::formatter<cargo::shutdown_message> : formatter<std::string_view> { // parse is inherited from formatter<string_view>. Loading
src/worker/worker.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,16 @@ worker::run() { break; } case tag::bw_shaping: { shaper_message m; world.recv(msg->source(), msg->tag(), m); LOGGER_INFO("msg => from: {} body: {}", msg->source(), m); // TODO: Do something with m.shaping; break; } case tag::shutdown: LOGGER_INFO("msg => from: {} body: {{shutdown}}", msg->source()); Loading