diff options
| author | Sébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com> | 2023-04-23 14:33:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-23 14:33:56 +0200 |
| commit | 561ff979d574f496415c0499345d41da2e1f6e1e (patch) | |
| tree | 037479ac000bd87a1cb2149e5389b28f08d24051 /src/export/pdf/mod.rs | |
| parent | 2fbb14f712708188649181525813b3ac5a02e0fb (diff) | |
Add instrumentation (Part 1) (#761)
Diffstat (limited to 'src/export/pdf/mod.rs')
| -rw-r--r-- | src/export/pdf/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/export/pdf/mod.rs b/src/export/pdf/mod.rs index 8fc76471..ffbf67a3 100644 --- a/src/export/pdf/mod.rs +++ b/src/export/pdf/mod.rs @@ -23,6 +23,7 @@ use crate::model::Introspector; /// Export a document into a PDF file. /// /// Returns the raw bytes making up the PDF file. +#[tracing::instrument(skip_all)] pub fn pdf(document: &Document) -> Vec<u8> { let mut ctx = PdfContext::new(document); page::construct_pages(&mut ctx, &document.pages); @@ -79,6 +80,7 @@ impl<'a> PdfContext<'a> { } /// Write the document catalog. +#[tracing::instrument(skip_all)] fn write_catalog(ctx: &mut PdfContext) { let lang = ctx .languages @@ -140,6 +142,7 @@ fn write_catalog(ctx: &mut PdfContext) { } /// Compress data with the DEFLATE algorithm. +#[tracing::instrument(skip_all)] fn deflate(data: &[u8]) -> Vec<u8> { const COMPRESSION_LEVEL: u8 = 6; miniz_oxide::deflate::compress_to_vec_zlib(data, COMPRESSION_LEVEL) |
