mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add profiling spans for Server::new and World::generate
This commit is contained in:
parent
4b6c5f57e3
commit
ed4643e80b
@ -90,6 +90,7 @@ use common_net::{
|
|||||||
};
|
};
|
||||||
use common_state::{BlockDiff, BuildAreas, State};
|
use common_state::{BlockDiff, BuildAreas, State};
|
||||||
use common_systems::add_local_systems;
|
use common_systems::add_local_systems;
|
||||||
|
use common_base::prof_span;
|
||||||
use metrics::{EcsSystemMetrics, PhysicsMetrics, TickMetrics};
|
use metrics::{EcsSystemMetrics, PhysicsMetrics, TickMetrics};
|
||||||
use network::{ListenAddr, Network, Pid};
|
use network::{ListenAddr, Network, Pid};
|
||||||
use persistence::{
|
use persistence::{
|
||||||
@ -221,6 +222,7 @@ impl Server {
|
|||||||
data_dir: &std::path::Path,
|
data_dir: &std::path::Path,
|
||||||
runtime: Arc<Runtime>,
|
runtime: Arc<Runtime>,
|
||||||
) -> Result<Self, Error> {
|
) -> Result<Self, Error> {
|
||||||
|
prof_span!("Server::new");
|
||||||
info!("Server data dir is: {}", data_dir.display());
|
info!("Server data dir is: {}", data_dir.display());
|
||||||
if settings.auth_server_address.is_none() {
|
if settings.auth_server_address.is_none() {
|
||||||
info!("Authentication is disabled");
|
info!("Authentication is disabled");
|
||||||
|
@ -55,6 +55,7 @@ use common::{
|
|||||||
},
|
},
|
||||||
vol::{ReadVol, RectVolSize, WriteVol},
|
vol::{ReadVol, RectVolSize, WriteVol},
|
||||||
};
|
};
|
||||||
|
use common_base::prof_span;
|
||||||
use common_net::msg::{world_msg, WorldMapMsg};
|
use common_net::msg::{world_msg, WorldMapMsg};
|
||||||
use enum_map::EnumMap;
|
use enum_map::EnumMap;
|
||||||
use rand::{prelude::*, Rng};
|
use rand::{prelude::*, Rng};
|
||||||
@ -110,6 +111,7 @@ impl World {
|
|||||||
opts: sim::WorldOpts,
|
opts: sim::WorldOpts,
|
||||||
threadpool: &rayon::ThreadPool,
|
threadpool: &rayon::ThreadPool,
|
||||||
) -> (Self, IndexOwned) {
|
) -> (Self, IndexOwned) {
|
||||||
|
prof_span!("World::generate");
|
||||||
// NOTE: Generating index first in order to quickly fail if the color manifest
|
// NOTE: Generating index first in order to quickly fail if the color manifest
|
||||||
// is broken.
|
// is broken.
|
||||||
threadpool.install(|| {
|
threadpool.install(|| {
|
||||||
|
Loading…
Reference in New Issue
Block a user