Revert "[BENCHMARK_APP] Show input command in output (#13402)" (#14027)

This reverts commit f893a58816.
This commit is contained in:
Nadezhda Ageeva
2022-11-18 11:43:41 +00:00
committed by GitHub
parent 198adbf266
commit 8588603506
2 changed files with 4 additions and 47 deletions

View File

@@ -28,41 +28,10 @@
#include "remote_tensors_filling.hpp"
#include "statistics_report.hpp"
#include "utils.hpp"
#if defined(_WIN32) || defined(WIN32)
# include <windows.h>
#endif
// clang-format on
static const size_t progressBarDefaultTotalCount = 1000;
std::string get_console_command(int argc, char* argv[]) {
std::stringstream args_command;
#if defined(_WIN32) || defined(WIN32)
std::string relative_path(argv[0]);
std::vector<char> buffer;
uint32_t len = 1;
do {
buffer.resize(len);
len = GetFullPathNameA(relative_path.data(), len, buffer.data(), nullptr);
} while (len > buffer.size());
std::string full_path(buffer.begin(), buffer.end());
args_command << full_path;
#else
args_command << realpath(argv[0], nullptr);
#endif
args_command << " ";
for (int i = 1; i < argc; i++) {
args_command << argv[i] << " ";
}
return args_command.str();
}
bool parse_and_check_command_line(int argc, char* argv[]) {
// ---------------------------Parsing and validating input
// arguments--------------------------------------
@@ -224,19 +193,12 @@ int main(int argc, char* argv[]) {
// ----------------- 1. Parsing and validating input arguments
// -------------------------------------------------
// Must be executed before parse_and_check_command_line()
// gflags::ParseCommandLineNonHelpFlags() modifies the argv array
auto command_from_args = get_console_command(argc, argv);
next_step();
if (!parse_and_check_command_line(argc, argv)) {
return 0;
}
slog::info << "Input command: " << command_from_args << slog::endl;
bool isNetworkCompiled = fileExt(FLAGS_m) == "blob";
if (isNetworkCompiled) {
slog::info << "Model is compiled" << slog::endl;