Merged
This commit is contained in:
commit
0f7cae6de7
1 file changed
+27
-2
@@ -9,11 +9,13 @@
|
||||
#include "lib/md/UserSymbol.h"
|
||||
#include "lib/md/Diag/ShmDumper.h"
|
||||
#include "lib/md/Diag/MDPeriodicDumper.h"
|
||||
#include "lib/md/cme/MDP3Utils.h"
|
||||
#include "platforms/mdp3_onixs/MDP3Main.h"
|
||||
#include "lib/md/SecurityDB.h"
|
||||
#include "server/sparkd/exchange_sim/ExchangeSim.h"
|
||||
#include "lib/utils/thread_manager.h"
|
||||
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
@@ -260,10 +262,32 @@ void run_tail(const vector<string>& args) {
|
||||
md::run_periodic_dumper(products, mod, fmt);
|
||||
}
|
||||
|
||||
|
||||
void run_channels() {
|
||||
auto channels = md::get_configured_cme_channels();
|
||||
for (const auto& ch : channels) {
|
||||
std::cout << ch.id << " - " ;
|
||||
std::set<std::string> symbols;
|
||||
for (const auto& s : ch.symbols) { symbols.insert(s.symbol()); }
|
||||
for (const auto& s : symbols) {
|
||||
std::cout << s << " ";
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
string help() {
|
||||
return "Coconut 2.0 market data tools:\n" ;
|
||||
return "Market data tools:\n"
|
||||
" record \t-- Record market data to a file.\n"
|
||||
" rectool \t-- Manipulate recorded market data. \n"
|
||||
" cleanup \t-- Remove all persisted market data shared memory sections\n"
|
||||
" dump <symbol> <type> [exchange] [platform] [hot]\n"
|
||||
" replay \t-- replay recorded market data.\n"
|
||||
" run \t\t-- run market data publishers.\n"
|
||||
" relay \t-- relay market data from another system.\n"
|
||||
" dumpsecurity <id|all> \t-- print information about a specific security or all securities.\n"
|
||||
" tail [count] \t-- print out books when sequence%count==0.\n"
|
||||
" channels \t-- list configured cme channels.\n"
|
||||
;
|
||||
}
|
||||
void printhelp() {
|
||||
cout << help() << endl;
|
||||
@@ -282,6 +306,7 @@ void md_tool(std::vector<std::string> const &args) {
|
||||
else if (cmd == "test_relay") relay_everything();
|
||||
else if (cmd == "dumpsecurity" || cmd == "dumpsecurities") dump_db(vector<string>(args.begin()+1, args.end()));
|
||||
else if (cmd == "tail") run_tail(args);
|
||||
else if (cmd == "channels") run_channels();
|
||||
else printhelp();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user