diff --git a/server/src/lib.rs b/server/src/lib.rs index e108015a27..92e55ab833 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -90,6 +90,7 @@ use common_net::{ }; use common_state::{BlockDiff, BuildAreas, State}; use common_systems::add_local_systems; +use common_base::prof_span; use metrics::{EcsSystemMetrics, PhysicsMetrics, TickMetrics}; use network::{ListenAddr, Network, Pid}; use persistence::{ @@ -221,6 +222,7 @@ impl Server { data_dir: &std::path::Path, runtime: Arc, ) -> Result { + prof_span!("Server::new"); info!("Server data dir is: {}", data_dir.display()); if settings.auth_server_address.is_none() { info!("Authentication is disabled"); diff --git a/world/src/lib.rs b/world/src/lib.rs index fe59e1b8c0..5f095572a1 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -55,6 +55,7 @@ use common::{ }, vol::{ReadVol, RectVolSize, WriteVol}, }; +use common_base::prof_span; use common_net::msg::{world_msg, WorldMapMsg}; use enum_map::EnumMap; use rand::{prelude::*, Rng}; @@ -110,6 +111,7 @@ impl World { opts: sim::WorldOpts, threadpool: &rayon::ThreadPool, ) -> (Self, IndexOwned) { + prof_span!("World::generate"); // NOTE: Generating index first in order to quickly fail if the color manifest // is broken. threadpool.install(|| {