Namespace ProfilingClock
This commit is contained in:
parent
2efcbfc8fb
commit
0ff835d7ec
@ -1335,7 +1335,7 @@ float VoxelGeneratorGraph::debug_measure_microseconds_per_voxel(bool singular) {
|
|||||||
// const uint32_t cube_size = 100;
|
// const uint32_t cube_size = 100;
|
||||||
// const uint32_t cube_count = 1;
|
// const uint32_t cube_count = 1;
|
||||||
const uint32_t voxel_count = cube_size * cube_size * cube_size * cube_count;
|
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;
|
uint64_t elapsed_us = 0;
|
||||||
|
|
||||||
Cache &cache = _cache;
|
Cache &cache = _cache;
|
||||||
|
@ -1322,7 +1322,7 @@ void VoxelLodTerrain::_process(float delta) {
|
|||||||
// It has to happen first because blocks can be unloaded afterwards.
|
// It has to happen first because blocks can be unloaded afterwards.
|
||||||
flush_pending_lod_edits();
|
flush_pending_lod_edits();
|
||||||
|
|
||||||
ProfilingClock profiling_clock;
|
zylann::ProfilingClock profiling_clock;
|
||||||
|
|
||||||
static thread_local std::vector<BlockToSave> data_blocks_to_save;
|
static thread_local std::vector<BlockToSave> data_blocks_to_save;
|
||||||
|
|
||||||
|
@ -828,7 +828,7 @@ void VoxelTerrain::_process() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VoxelTerrain::process_viewers() {
|
void VoxelTerrain::process_viewers() {
|
||||||
ProfilingClock profiling_clock;
|
zylann::ProfilingClock profiling_clock;
|
||||||
|
|
||||||
// Ordered by ascending index in paired viewers list
|
// Ordered by ascending index in paired viewers list
|
||||||
std::vector<size_t> unpaired_viewer_indexes;
|
std::vector<size_t> unpaired_viewer_indexes;
|
||||||
@ -1117,7 +1117,7 @@ void VoxelTerrain::apply_data_block_response(VoxelServer::BlockDataOutput &ob) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VoxelTerrain::process_meshing() {
|
void VoxelTerrain::process_meshing() {
|
||||||
ProfilingClock profiling_clock;
|
zylann::ProfilingClock profiling_clock;
|
||||||
|
|
||||||
_stats.dropped_block_meshs = 0;
|
_stats.dropped_block_meshs = 0;
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include <core/os/time.h>
|
#include <core/os/time.h>
|
||||||
|
|
||||||
|
namespace zylann {
|
||||||
|
|
||||||
struct ProfilingClock {
|
struct ProfilingClock {
|
||||||
uint64_t time_before = 0;
|
uint64_t time_before = 0;
|
||||||
|
|
||||||
@ -18,4 +20,6 @@ struct ProfilingClock {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace zylann
|
||||||
|
|
||||||
#endif // PROFILING_CLOCK_H
|
#endif // PROFILING_CLOCK_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user