mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 14:42:24 +01:00
Change some profiler values to microseconds
This commit is contained in:
parent
eb432d3da0
commit
c8e46749a4
@ -122,7 +122,7 @@ void Sky::render()
|
||||
if (!camera || !driver)
|
||||
return;
|
||||
|
||||
ScopeProfiler sp(g_profiler, "Sky::render()", SPT_AVG);
|
||||
ScopeProfiler sp(g_profiler, "Sky::render()", SPT_AVG, PRECISION_MICRO);
|
||||
|
||||
// Draw perspective skybox
|
||||
|
||||
|
@ -234,7 +234,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
||||
Map *map = &env->getMap();
|
||||
ServerEnvironment *s_env = dynamic_cast<ServerEnvironment*>(env);
|
||||
|
||||
ScopeProfiler sp(g_profiler, PROFILER_NAME("collisionMoveSimple()"), SPT_AVG);
|
||||
ScopeProfiler sp(g_profiler, PROFILER_NAME("collisionMoveSimple()"), SPT_AVG, PRECISION_MICRO);
|
||||
|
||||
collisionMoveResult result;
|
||||
|
||||
@ -273,7 +273,7 @@ collisionMoveResult collisionMoveSimple(Environment *env, IGameDef *gamedef,
|
||||
std::vector<NearbyCollisionInfo> cinfo;
|
||||
{
|
||||
//TimeTaker tt2("collisionMoveSimple collect boxes");
|
||||
ScopeProfiler sp2(g_profiler, PROFILER_NAME("collision collect boxes"), SPT_AVG);
|
||||
ScopeProfiler sp2(g_profiler, PROFILER_NAME("collision collect boxes"), SPT_AVG, PRECISION_MICRO);
|
||||
|
||||
v3f minpos_f(
|
||||
MYMIN(pos_f->X, newpos_f.X),
|
||||
|
@ -639,8 +639,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
|
||||
try {
|
||||
std::istringstream is(*blob, std::ios_base::binary);
|
||||
|
||||
u8 version = SER_FMT_VER_INVALID;
|
||||
is.read((char*)&version, 1);
|
||||
u8 version = readU8(is);
|
||||
|
||||
if(is.fail())
|
||||
throw SerializationError("ServerMap::loadBlock(): Failed"
|
||||
@ -655,9 +654,8 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
|
||||
}
|
||||
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: deSer block", SPT_AVG);
|
||||
// Read basic data
|
||||
block->deSerialize(is, version, true);
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: deSer block", SPT_AVG, PRECISION_MICRO);
|
||||
block->deSerialize(is, version, true);
|
||||
}
|
||||
|
||||
// If it's a new block, insert it to the map
|
||||
@ -699,7 +697,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool
|
||||
|
||||
MapBlock* ServerMap::loadBlock(v3s16 blockpos)
|
||||
{
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: load block", SPT_AVG);
|
||||
ScopeProfiler sp(g_profiler, "ServerMap: load block", SPT_AVG, PRECISION_MICRO);
|
||||
bool created_new = (getBlockNoCreateNoEx(blockpos) == NULL);
|
||||
|
||||
v2s16 p2d(blockpos.X, blockpos.Z);
|
||||
|
Loading…
Reference in New Issue
Block a user