| 55 | class KernelStats { |
| 56 | public: |
| 57 | KernelStats() : wait_to_collect_(true), collect_op_cost_(false), |
| 58 | stop_counter_(0), counter_(0) { |
| 59 | Status s = ReadInt64FromEnvVar( |
| 60 | start_node_stats_step_env_name, 100, &start_step_); |
| 61 | if (!s.ok()) { |
| 62 | LOG(WARNING) << "Read START_NODE_STATS_STEP envrionment error. " |
| 63 | << s.error_message(); |
| 64 | } |
| 65 | s = ReadInt64FromEnvVar( |
| 66 | stop_node_stats_step_env_name, 200, &stop_step_); |
| 67 | if (!s.ok()) { |
| 68 | LOG(WARNING) << "Read STOP_NODE_STATS_STEP envrionment error. " |
| 69 | << s.error_message(); |
| 70 | } |
| 71 | if (start_step_ > 0 && stop_step_ > 0 && |
| 72 | stop_step_ > start_step_) { |
| 73 | collect_kernel_stats = true; |
| 74 | VLOG(1) << "User collect node stats, start_step is " << start_step_ |
| 75 | << ", stop_step is " << stop_step_; |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void Initialize(const GraphView& gview, |
| 80 | const Graph* g) { |
nothing calls this directly
no test coverage detected