Skip to main content

mz_timely_util/
scope_label.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License in the LICENSE file at the
6// root of this repository, or online at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Scopes with profiling labels set at schedule time.
17
18use timely::dataflow::Scope;
19use timely::progress::Timestamp;
20
21/// Extension trait for timely [`Scope`] that allows one to convert a scope into one that sets its
22/// name as a profiling label before scheduling its child operators.
23pub trait ScopeExt: Sized {
24    fn with_label(self) -> Self;
25}
26
27impl<'scope, T: Timestamp> ScopeExt for Scope<'scope, T> {
28    fn with_label(self) -> Self {
29        // TODO(mcsherry): figure out what this is meant to do, and help do it.
30        // Restoring labelling via `scoped_raw` is the likely path forward.
31        self
32    }
33}