When modeling is enabled, this method records the fact that a thread of this iterator has started work.
| 888 | // When modeling is enabled, this method records the fact that a thread of |
| 889 | // this iterator has started work. |
| 890 | void RecordStart(IteratorContext* ctx, bool stop_output = false) { |
| 891 | if (collect_resource_usage(ctx)) { |
| 892 | int64 now_nanos = Env::Default()->NowNanos(); |
| 893 | if (stop_output && node_->output()) { |
| 894 | node_->output()->record_stop(now_nanos); |
| 895 | } |
| 896 | node_->record_start(now_nanos); |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | // When modeling is enabled, this method records the fact that a thread of |
| 901 | // this iterator has stopped work. |