Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/tracedecay-code-extraction/src/astro_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl LanguageExtractor for AstroExtractor {
crate::hotpath_observe::measure_language(|| Cow::Owned(Self::mask_non_frontmatter(source)))
}

#[hotpath::measure(label = "code_extraction.astro.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_astro(file_path, source)
}
Expand All @@ -102,6 +103,7 @@ impl LanguageExtractor for AstroExtractor {
)
}

#[hotpath::measure(label = "code_extraction.astro.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/bash_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ impl BashExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.bash.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -146,6 +147,7 @@ impl BashExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.bash.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("bash", "Bash", source)
}
Expand Down Expand Up @@ -431,10 +433,12 @@ impl crate::LanguageExtractor for BashExtractor {
"Bash"
}

#[hotpath::measure(label = "code_extraction.bash.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_bash(file_path, source)
}

#[hotpath::measure(label = "code_extraction.bash.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/batch_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ impl BatchExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.batch.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -165,6 +166,7 @@ impl BatchExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.batch.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("batch", "Batch", source)
}
Expand Down Expand Up @@ -480,10 +482,12 @@ impl crate::LanguageExtractor for BatchExtractor {
"Batch"
}

#[hotpath::measure(label = "code_extraction.batch.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_batch(file_path, source)
}

#[hotpath::measure(label = "code_extraction.batch.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/c_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ impl CExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.c.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -175,6 +176,7 @@ impl CExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.c.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("c", "C", source)
}
Expand Down Expand Up @@ -1400,10 +1402,12 @@ impl crate::LanguageExtractor for CExtractor {
"C"
}

#[hotpath::measure(label = "code_extraction.c.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
CExtractor::extract_source(file_path, source)
}

#[hotpath::measure(label = "code_extraction.c.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/clojure_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl ClojureExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.clojure.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -133,6 +134,7 @@ impl ClojureExtractor {
)
}

#[hotpath::measure(label = "code_extraction.clojure.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("clojure", "Clojure", source)
}
Expand Down Expand Up @@ -537,10 +539,12 @@ impl crate::LanguageExtractor for ClojureExtractor {
"Clojure"
}

#[hotpath::measure(label = "code_extraction.clojure.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_clojure(file_path, source)
}

#[hotpath::measure(label = "code_extraction.clojure.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/cobol_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ impl CobolExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.cobol.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -164,6 +165,7 @@ impl CobolExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.cobol.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("cobol", "COBOL", source)
}
Expand Down Expand Up @@ -652,10 +654,12 @@ impl crate::LanguageExtractor for CobolExtractor {
"COBOL"
}

#[hotpath::measure(label = "code_extraction.cobol.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_cobol(file_path, source)
}

#[hotpath::measure(label = "code_extraction.cobol.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/cpp_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ impl CppExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.cpp.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -188,6 +189,7 @@ impl CppExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.cpp.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("cpp", "C++", source)
}
Expand Down Expand Up @@ -600,10 +602,12 @@ impl crate::LanguageExtractor for CppExtractor {
"C++"
}

#[hotpath::measure(label = "code_extraction.cpp.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
CppExtractor::extract_source(file_path, source)
}

#[hotpath::measure(label = "code_extraction.cpp.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/csharp_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ impl CSharpExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.csharp.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -147,6 +148,7 @@ impl CSharpExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.csharp.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("c_sharp", "C#", source)
}
Expand Down Expand Up @@ -1703,10 +1705,12 @@ impl crate::LanguageExtractor for CSharpExtractor {
"C#"
}

#[hotpath::measure(label = "code_extraction.csharp.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
CSharpExtractor::extract_csharp(file_path, source)
}

#[hotpath::measure(label = "code_extraction.csharp.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/dart_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ impl DartExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.dart.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -159,6 +160,7 @@ impl DartExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.dart.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("dart", "Dart", source)
}
Expand Down Expand Up @@ -1865,10 +1867,12 @@ impl crate::LanguageExtractor for DartExtractor {
"Dart"
}

#[hotpath::measure(label = "code_extraction.dart.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
DartExtractor::extract_dart(file_path, source)
}

#[hotpath::measure(label = "code_extraction.dart.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/dockerfile_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ impl DockerfileExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.dockerfile.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -158,6 +159,7 @@ impl DockerfileExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.dockerfile.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("dockerfile", "Dockerfile", source)
}
Expand Down Expand Up @@ -644,10 +646,12 @@ impl crate::LanguageExtractor for DockerfileExtractor {
"Dockerfile"
}

#[hotpath::measure(label = "code_extraction.dockerfile.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_dockerfile(file_path, source)
}

#[hotpath::measure(label = "code_extraction.dockerfile.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/elixir_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ impl ElixirExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.elixir.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -133,6 +134,7 @@ impl ElixirExtractor {
)
}

#[hotpath::measure(label = "code_extraction.elixir.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("elixir", "Elixir", source)
}
Expand Down Expand Up @@ -569,10 +571,12 @@ impl crate::LanguageExtractor for ElixirExtractor {
"Elixir"
}

#[hotpath::measure(label = "code_extraction.elixir.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_elixir(file_path, source)
}

#[hotpath::measure(label = "code_extraction.elixir.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/erlang_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl ErlangExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.erlang.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -112,6 +113,7 @@ impl ErlangExtractor {
)
}

#[hotpath::measure(label = "code_extraction.erlang.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("erlang", "Erlang", source)
}
Expand Down Expand Up @@ -434,10 +436,12 @@ impl crate::LanguageExtractor for ErlangExtractor {
"Erlang"
}

#[hotpath::measure(label = "code_extraction.erlang.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_erlang(file_path, source)
}

#[hotpath::measure(label = "code_extraction.erlang.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/fortran_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl FortranExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.fortran.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -145,6 +146,7 @@ impl FortranExtractor {
}

/// Parse source code into a tree-sitter AST.
#[hotpath::measure(label = "code_extraction.fortran.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("fortran", "Fortran", source)
}
Expand Down Expand Up @@ -900,10 +902,12 @@ impl crate::LanguageExtractor for FortranExtractor {
"Fortran"
}

#[hotpath::measure(label = "code_extraction.fortran.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_fortran(file_path, source)
}

#[hotpath::measure(label = "code_extraction.fortran.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
4 changes: 4 additions & 0 deletions crates/tracedecay-code-extraction/src/fsharp_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ impl FSharpExtractor {
.result
}

#[hotpath::measure(label = "code_extraction.fsharp.extract_tree")]
fn extract_tree(
file_path: &str,
source: &str,
Expand Down Expand Up @@ -134,6 +135,7 @@ impl FSharpExtractor {
)
}

#[hotpath::measure(label = "code_extraction.fsharp.parse_source")]
fn parse_source(source: &str) -> Result<Tree, String> {
crate::ts_provider::parse_extractor_source("fsharp", "F#", source)
}
Expand Down Expand Up @@ -547,10 +549,12 @@ impl crate::LanguageExtractor for FSharpExtractor {
"F#"
}

#[hotpath::measure(label = "code_extraction.fsharp.extract")]
fn extract(&self, file_path: &str, source: &str) -> ExtractionResult {
Self::extract_fsharp(file_path, source)
}

#[hotpath::measure(label = "code_extraction.fsharp.extract_parsed")]
fn extract_parsed(
&self,
file_path: &str,
Expand Down
Loading
Loading