#include <boost/algorithm/string/join.hpp>
static std::unordered_map<std::string, simgrid::s4u::File*> opened_files;
#define ACT_DEBUG(...) \
if (XBT_LOG_ISENABLED(storage_actions, xbt_log_priority_verbose)) { \
char* NAME = xbt_str_join_array(action, " "); \
XBT_DEBUG(__VA_ARGS__); \
xbt_free(NAME); \
} else \
((void)0)
static void log_action(const char* const* action, double date)
{
}
}
{
return opened_files.at(full_name);
}
class Replayer {
public:
explicit Replayer(std::vector<std::string> args)
{
argv[0] = &args.at(0)[0];
if (args.size() == 1) {
argc = 1;
} else {
argc = 2;
argv[1] = &args.at(1)[0];
}
}
void operator()()
{
}
static void open(const char* const* action)
{
const char* file_name = action[2];
ACT_DEBUG("Entering Open: %s (filename: %s)", NAME, file_name);
opened_files.insert({full_name, file});
}
static void read(const char* const* action)
{
const char* file_name = action[2];
ACT_DEBUG("Entering Read: %s (size: %llu)", NAME, size);
}
static void close(const char* const* action)
{
const char* file_name = action[2];
ACT_DEBUG("Entering Close: %s (filename: %s)", NAME, file_name);
delete file;
}
};
int main(
int argc,
char* argv[])
{
xbt_assert(argc > 3,
"Usage: %s platform_file deployment_file [action_files]\n" "\texample: %s platform.xml deployment.xml actions # if all actions are in the same file\n"
"\t# if actions are in separate files, specified in deployment\n"
"\texample: %s platform.xml deployment.xml",
argv[0], argv[0], argv[0]);
if (argv[3]) {
}
if (argv[3]) {
}
return 0;
}