Unverified Commit 778ee4fc authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

[Turbopack] cleanup and documentation (#73496)

### What?

* avoid flagging "thread" span as incomplete
* improve error message
* add comments
* fixup print_stats
* fix lmdb feature
parent 74671c1d
...@@ -915,7 +915,7 @@ pub async fn load_next_js_templateon<T: DeserializeOwned>( ...@@ -915,7 +915,7 @@ pub async fn load_next_js_templateon<T: DeserializeOwned>(
let content = &*file_path.read().await?; let content = &*file_path.read().await?;
let FileContent::Content(file) = content else { let FileContent::Content(file) = content else {
bail!("Expected file content at {}", path); bail!("Expected file content at {}", file_path.to_string().await?);
}; };
let result: T = parse_json_rope_with_source_context(file.content())?; let result: T = parse_json_rope_with_source_context(file.content())?;
......
...@@ -295,7 +295,7 @@ impl TurboPersistence { ...@@ -295,7 +295,7 @@ impl TurboPersistence {
.into_iter() .into_iter()
.map(|seq| self.open_sst(seq)) .map(|seq| self.open_sst(seq))
.collect::<Result<Vec<StaticSortedFile>>>()?; .collect::<Result<Vec<StaticSortedFile>>>()?;
#[cfg(feature = "stats")] #[cfg(feature = "print_stats")]
{ {
for sst in sst_files.iter() { for sst in sst_files.iter() {
let crate::static_sorted_file::StaticSortedFileRange { let crate::static_sorted_file::StaticSortedFileRange {
......
...@@ -441,8 +441,8 @@ impl<'a> SpanRef<'a> { ...@@ -441,8 +441,8 @@ impl<'a> SpanRef<'a> {
.and_modify(|_, v| v.push(span.index())) .and_modify(|_, v| v.push(span.index()))
.or_insert_with(|| (value.to_string(), vec![span.index()])); .or_insert_with(|| (value.to_string(), vec![span.index()]));
} }
if !span.is_complete() { if !span.is_complete() && !span.time_data().ignore_self_time {
let name = "incomplete"; let name = "incomplete_span";
index index
.raw_entry_mut() .raw_entry_mut()
.from_key(name) .from_key(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment