summaryrefslogtreecommitdiff
path: root/library/src/layout/flow.rs
diff options
context:
space:
mode:
authorSébastien d'Herbais de Thun <sebastien.d.herbais@gmail.com>2023-04-23 14:33:56 +0200
committerGitHub <noreply@github.com>2023-04-23 14:33:56 +0200
commit561ff979d574f496415c0499345d41da2e1f6e1e (patch)
tree037479ac000bd87a1cb2149e5389b28f08d24051 /library/src/layout/flow.rs
parent2fbb14f712708188649181525813b3ac5a02e0fb (diff)
Add instrumentation (Part 1) (#761)
Diffstat (limited to 'library/src/layout/flow.rs')
-rw-r--r--library/src/layout/flow.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/library/src/layout/flow.rs b/library/src/layout/flow.rs
index b45c39c2..64d1d509 100644
--- a/library/src/layout/flow.rs
+++ b/library/src/layout/flow.rs
@@ -19,6 +19,7 @@ pub struct FlowElem {
}
impl Layout for FlowElem {
+ #[tracing::instrument(name = "FlowElem::layout", skip_all)]
fn layout(
&self,
vt: &mut Vt,
@@ -122,6 +123,7 @@ impl<'a> FlowLayouter<'a> {
}
/// Layout vertical spacing.
+ #[tracing::instrument(name = "FlowLayouter::layout_spacing", skip_all)]
fn layout_spacing(&mut self, v: &VElem, styles: StyleChain) {
self.layout_item(match v.amount() {
Spacing::Rel(rel) => FlowItem::Absolute(
@@ -133,6 +135,7 @@ impl<'a> FlowLayouter<'a> {
}
/// Layout a paragraph.
+ #[tracing::instrument(name = "FlowLayouter::layout_par", skip_all)]
fn layout_par(
&mut self,
vt: &mut Vt,
@@ -179,6 +182,7 @@ impl<'a> FlowLayouter<'a> {
}
/// Layout into a single region.
+ #[tracing::instrument(name = "FlowLayouter::layout_single", skip_all)]
fn layout_single(
&mut self,
vt: &mut Vt,
@@ -237,6 +241,7 @@ impl<'a> FlowLayouter<'a> {
}
/// Layout a finished frame.
+ #[tracing::instrument(name = "FlowLayouter::layout_item", skip_all)]
fn layout_item(&mut self, item: FlowItem) {
match item {
FlowItem::Absolute(v, _) => self.regions.size.y -= v,