Namespace ProfilingClock

This commit is contained in:
Marc Gilleron 2022-01-03 01:40:13 +00:00
parent 2efcbfc8fb
commit 0ff835d7ec
4 changed files with 8 additions and 4 deletions

View File

@ -1335,7 +1335,7 @@ float VoxelGeneratorGraph::debug_measure_microseconds_per_voxel(bool singular) {
// const uint32_t cube_size = 100;
// const uint32_t cube_count = 1;
const uint32_t voxel_count = cube_size * cube_size * cube_size * cube_count;
ProfilingClock profiling_clock;
zylann::ProfilingClock profiling_clock;
uint64_t elapsed_us = 0;
Cache &cache = _cache;

View File

@ -1322,7 +1322,7 @@ void VoxelLodTerrain::_process(float delta) {
// It has to happen first because blocks can be unloaded afterwards.
flush_pending_lod_edits();
ProfilingClock profiling_clock;
zylann::ProfilingClock profiling_clock;
static thread_local std::vector<BlockToSave> data_blocks_to_save;

View File

@ -828,7 +828,7 @@ void VoxelTerrain::_process() {
}
void VoxelTerrain::process_viewers() {
ProfilingClock profiling_clock;
zylann::ProfilingClock profiling_clock;
// Ordered by ascending index in paired viewers list
std::vector<size_t> unpaired_viewer_indexes;
@ -1117,7 +1117,7 @@ void VoxelTerrain::apply_data_block_response(VoxelServer::BlockDataOutput &ob) {
}
void VoxelTerrain::process_meshing() {
ProfilingClock profiling_clock;
zylann::ProfilingClock profiling_clock;
_stats.dropped_block_meshs = 0;

View File

@ -3,6 +3,8 @@
#include <core/os/time.h>
namespace zylann {
struct ProfilingClock {
uint64_t time_before = 0;
@ -18,4 +20,6 @@ struct ProfilingClock {
}
};
} // namespace zylann
#endif // PROFILING_CLOCK_H