When modeling is enabled, this method records the fact that a thread of this iterator has stopped work.
| 900 | // When modeling is enabled, this method records the fact that a thread of |
| 901 | // this iterator has stopped work. |
| 902 | void RecordStop(IteratorContext* ctx, bool start_output = false) { |
| 903 | if (collect_resource_usage(ctx)) { |
| 904 | int64 now_nanos = Env::Default()->NowNanos(); |
| 905 | node_->record_stop(now_nanos); |
| 906 | if (start_output && node_->output()) { |
| 907 | node_->output()->record_start(now_nanos); |
| 908 | } |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | private: |
| 913 | inline bool collect_resource_usage(IteratorContext* ctx) { |