Instrument tesselation and tile parsing

This commit is contained in:
Maximilian Ammann 2022-04-05 17:51:41 +02:00
parent 6b63f22e37
commit c8578939e0
2 changed files with 7 additions and 1 deletions

View File

@ -205,7 +205,12 @@ impl ThreadLocalState {
}
TileFetchResult::Tile { data, coords } => {
info!("parsing tile {} with {}bytes", &coords, data.len());
let tile = parse_tile_bytes(data).expect("failed to load tile");
let tile = {
let _span_ =
tracing::span!(tracing::Level::TRACE, "parse_tile_bytes").entered();
parse_tile_bytes(data).expect("failed to load tile")
};
for to_load in &tile_request.layers {
if let Some(layer) = tile

View File

@ -18,6 +18,7 @@ use crate::render::ShaderVertex;
use crate::tessellation::{Tessellated, VertexConstructor, DEFAULT_TOLERANCE};
impl<I: Add + From<lyon::lyon_tessellation::VertexId> + MaxIndex + Pod> Tessellated<I> for Layer {
#[tracing::instrument(skip_all)]
fn tessellate(&self) -> Result<(VertexBuffers<ShaderVertex, I>, Vec<u32>), Error> {
let mut buffer: VertexBuffers<ShaderVertex, I> = VertexBuffers::new();
let mut feature_indices: Vec<u32> = Vec::new();