tone down console output in MatcherValidationObserver; change hardcoded GC to ES (temp measure until the cmd accepts symbol args)
This commit is contained in:
1 parent
f67071708d
commit
f063d7ecbd
1 file changed
+3
-34
+3
-34
@@ -25,7 +25,7 @@
|
||||
// immediate console output (i.e., calls to std::cout).
|
||||
// If _ECHO_ON is defined, the _ERROR_LEVEL macro is set to Info
|
||||
// to avoid duplicate, and (perhaps more importantly) unsynchronized output.
|
||||
#define _ECHO_ON
|
||||
// #define _ECHO_ON
|
||||
#ifdef _ECHO_ON
|
||||
#define _ECHO(...) std::cout << bts::orderman::Formatter::fmt(__VA_ARGS__);
|
||||
#define _ERROR_LEVEL Info
|
||||
@@ -61,7 +61,7 @@ enum class Verbosity { Minimal = 0, Normal = 1, Verbose = 2 };
|
||||
inline std::string _log_header() { return "MatcherValidationObserver"; }
|
||||
|
||||
inline bool _is_interesting_sec(const InstrumentSnapshot& s) {
|
||||
return s.definition().asset() == "GC";
|
||||
return s.definition().asset() == "ES";
|
||||
//return strcmp(s.definition().asset(), "SI") == 0;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,6 @@ inline bool match_fills(const FillDepot& fd, std::vector<const InstrumentSnapsho
|
||||
bool matched = false;
|
||||
for (auto act_it = act_fills.begin(); act_it != act_fills.end(); act_it++) {
|
||||
if (fill_equals(*act_it, *exp_it)) {
|
||||
//out << "\tmatched expected: " << *exp_it << "\n\twith: " << *act_it << std::endl;
|
||||
act_fills.erase(act_it);
|
||||
matched = true;
|
||||
break;
|
||||
@@ -195,8 +194,7 @@ struct MatcherValidationObserver::PImpl {
|
||||
// actual event_id (from the exchange) of most recently observed event.
|
||||
size_t event_id = NO_EVENT;
|
||||
FifoMatcherContext exch_matcher;
|
||||
Verbosity verbosity = Verbosity::Normal;
|
||||
//EventFlags ignore_flags = EventFlags::IcebergOrders | EventFlags::MultipleSecurityAggressors;
|
||||
Verbosity verbosity = Verbosity::Minimal;
|
||||
EventFlags ignore_flags = EventFlags::MultipleSecurityAggressors;
|
||||
|
||||
// event_id is used to transition the security's trading status from
|
||||
@@ -375,35 +373,6 @@ void MatcherValidationObserver::on_real_time_event(MDP3Event const& ev) {
|
||||
if (sorted_secs.empty())
|
||||
return;
|
||||
std::sort(sorted_secs.begin(), sorted_secs.end(), security_comp::SymbolComp());
|
||||
|
||||
if (_me->verbosity > Verbosity::Minimal) {
|
||||
// describe the changes in this event (summary has )
|
||||
std::stringstream snap_str;
|
||||
diagnostics::print_instrument_snapshots(sorted_secs.begin(), sorted_secs.end(), snap_str);
|
||||
snap_str << std::endl;
|
||||
INFO("snapshot summary:\n", snap_str.str());
|
||||
for (const auto* s : sorted_secs) {
|
||||
// print fills
|
||||
if (s->fills().size()) {
|
||||
std::stringstream str;
|
||||
diagnostics::print_fills(s->fills().begin(), s->fills().end(), str);
|
||||
INFO(s->symbol(), " fills:\n", str.str(), "\n");
|
||||
}
|
||||
// print actual changes
|
||||
if (s->order_changes().size()) {
|
||||
std::stringstream str;
|
||||
diagnostics::print_order_changes(s->order_changes().begin(), s->order_changes().end(), str);
|
||||
INFO(s->symbol(), " net changes:\n", str.str(), "\n");
|
||||
}
|
||||
// print deduced changes
|
||||
auto deduced = s->deduced_order_changes();
|
||||
if (deduced.size()) {
|
||||
std::stringstream str;
|
||||
diagnostics::print_order_changes(deduced.begin(), deduced.end(), str);
|
||||
INFO(s->symbol(), " deduced changes:\n", str.str(), "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
// securities must be added to the matcher before the order
|
||||
// changes are processed to ensure the correct implied markets are used.
|
||||
for (const auto* s : sorted_secs) {
|
||||
|
||||
Reference in new issue
Block a user