feat: add support for mem peak to nativets scripts

This commit is contained in:
Ruben Fiszel
2024-02-19 23:38:27 +01:00
parent e28fbc9c97
commit 18bb982852
3 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -702,7 +702,7 @@ pub async fn eval_fetch_timeout(
})
});
run_future_with_polling_update_job_poller(
let r = run_future_with_polling_update_job_poller(
job_id,
job_timeout,
db,
@@ -718,7 +718,9 @@ pub async fn eval_fetch_timeout(
isolate.terminate_execution();
}
e
})
})?;
*mem_peak = (r.0.get().len() / 1000) as i32;
Ok(r)
}
async fn eval_fetch(js_runtime: &mut JsRuntime, expr: &str) -> anyhow::Result<Box<RawValue>> {
@@ -495,7 +495,7 @@
<Alert size="xs" title="Large file detected" type="warning">
We recommend using persistent storage for large data files.
<a
href="https://www.windmill.dev/docs/core_concepts/persistent_storage#large-data-files-s3-r2-minio"
href="https://www.windmill.dev/docs/core_concepts/persistent_storage#large-data-files-s3-r2-minio-azure-blob"
target="_blank"
rel="noreferrer"
class="hover:underline"
@@ -207,7 +207,7 @@
title="S3 Object recommended"
collapsible
size="xs"
documentationLink="Pattern (Regex) https://www.windmill.dev/docs/core_concepts/persistent_storage#large-data-files-s3-r2-minio"
documentationLink="Pattern (Regex) https://www.windmill.dev/docs/core_concepts/persistent_storage#large-data-files-s3-r2-minio-azure-blob"
>
For large files, we recommend using the S3 Object type instead of the base64 string type.
</Alert>