GraphChi  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros
graphchi_basic_includes.hpp
Go to the documentation of this file.
1 
2 
32 #ifndef GRAPHCHI_DEF_ALLBASIC_INCLUDES
33 #define GRAPHCHI_DEF_ALLBASIC_INCLUDES
34 
35 #include <omp.h>
36 #include <sstream>
37 
38 #include "api/chifilenames.hpp"
39 #include "api/graphchi_context.hpp"
40 #include "api/graphchi_program.hpp"
41 #include "api/graph_objects.hpp"
42 #include "api/ischeduler.hpp"
44 
46 
47 #include "logger/logger.hpp"
48 
49 #include "metrics/metrics.hpp"
54 #include "util/cmdopts.hpp"
55 
56 
57 namespace graphchi {
58 
62  void metrics_report(metrics &m);
64  std::string reporters = get_option_string("metrics.reporter", "console");
65  char * creps = (char*)reporters.c_str();
66  const char * delims = ",";
67  char * t = strtok(creps, delims);
68 
69  while(t != NULL) {
70  std::string repname(t);
71  if (repname == "basic" || repname == "console") {
72  basic_reporter rep;
73  m.report(rep);
74  } else if (repname == "file") {
75  file_reporter rep(get_option_string("metrics.reporter.filename", "metrics.txt"));
76  m.report(rep);
77  } else if (repname == "html") {
78  html_reporter rep(get_option_string("metrics.reporter.htmlfile", "metrics.html"));
79  m.report(rep);
80  } else {
81  logstream(LOG_WARNING) << "Could not find metrics reporter with name [" << repname << "], ignoring." << std::endl;
82  }
83  t = strtok(NULL, delims);
84  }
85  }
86 
87 };
88 
89 #endif