Skip to content

Commit

Permalink
add ability to filter by value and occurences
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Mar 8, 2024
1 parent f7624f1 commit 46b7cf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/turbo-tasks-fs/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub fn join_path(fs_path: &str, join: &str) -> Option<String> {
// Paths that we join are written as source code (eg, `join_path(fs_path,
// "foo/bar.js")`) and it's expected that they will never contain a
// backslash.
let join = join.replace('\\', "");
let join = &join;

debug_assert!(
!join.contains('\\'),
"joined path {} must not contain a Windows directory '\\', it must be normalized to Unix \
Expand Down
12 changes: 12 additions & 0 deletions crates/turbopack-trace-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ pub struct SpanViewEvent {
pub id: Option<SpanId>,
}

#[derive(Serialize, Deserialize, Debug)]
pub struct Filter {
pub op: Op,
pub value: Option<f64>,
}

#[derive(Serialize, Deserialize, Debug)]
pub enum Op {
Gt,
Lt,
}

#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct ViewRect {
Expand Down

0 comments on commit 46b7cf3

Please sign in to comment.