#include <Cli.h>
|  | 
|  | Cli (int argc, char *argv[]) | 
|  | 
| void | parse () | 
|  | 
|  | 
| std::map< char, std::string > | args | 
|  | 
Definition at line 27 of file Cli.h.
 
◆ Cli()
  
  | 
        
          | souffle::profile::Cli::Cli | ( | int | argc, |  
          |  |  | char * | argv[] |  
          |  | ) |  |  |  | inline | 
 
Definition at line 31 of file Cli.h.
   33         option longOptions[1];
 
   34         longOptions[0] = {
nullptr, 0, 
nullptr, 0};
 
   35         while ((c = getopt_long(argc, argv, 
"c:hj::", longOptions, 
nullptr)) != EOF) {
 
   40             if (optarg != 
nullptr) {
 
   50         if (optind < argc && 
args.count(
'f') == 0) {
 
   51             args[
'f'] = argv[optind];
 
 
References args.
 
 
◆ parse()
  
  | 
        
          | void souffle::profile::Cli::parse | ( |  | ) |  |  | inline | 
 
Definition at line 55 of file Cli.h.
   56         if (
args.size() == 0) {
 
   57             std::cout << 
"No arguments provided.\nTry souffle-profile -h for help.\n";
 
   61         if (
args.count(
'h') != 0 || 
args.count(
'f') == 0) {
 
   62             std::cout << 
"Souffle Profiler" << std::endl
 
   63                       << 
"Usage: souffle-profile <log-file> [ -h | -c <command> [options] | -j ]" << std::endl
 
   64                       << 
"<log-file>            The log file to profile." << std::endl
 
   65                       << 
"-c <command>          Run the given command on the log file, try with  " 
   66                          "'-c help' for a list" 
   68                       << 
"                      of commands." << std::endl
 
   69                       << 
"-j[filename]          Generate a GUI (html/js) version of the profiler." 
   71                       << 
"                      Default filename is profiler_html/[num].html" << std::endl
 
   72                       << 
"-h                    Print this help message." << std::endl;
 
   75         std::string filename = 
args[
'f'];
 
   77         if (
args.count(
'c') != 0) {
 
   78             Tui tui(filename, 
false, 
false);
 
   82         } 
else if (
args.count(
'j') != 0) {
 
   83             if (
args[
'j'] == 
"j") {
 
   84                 Tui(filename, 
false, 
true).outputHtml();
 
   86                 Tui(filename, 
false, 
true).outputHtml(
args[
'j']);
 
   89             Tui(filename, 
true, 
false).runProf();
 
 
References args, souffle::profile::Tui::runCommand(), souffle::profile::Tui::runProf(), and souffle::profile::Tools::split().
Referenced by main().
 
 
◆ args
      
        
          | std::map<char, std::string> souffle::profile::Cli::args | 
      
 
 
The documentation for this class was generated from the following file:
- include/souffle/profile/Cli.h