Added a (commented-out) performance test for biome generator
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1409 0a769ca7-a7f5-676a-18bf-c427514a06d6master
parent
817b9ba235
commit
7d039dfa90
|
@ -168,6 +168,19 @@ void cComposableGenerator::InitBiomeGen(cIniFile & a_IniFile)
|
||||||
LOGWARNING("Unknown BiomeGen \"%s\", using \"MultiStepMap\" instead.", BiomeGenName.c_str());
|
LOGWARNING("Unknown BiomeGen \"%s\", using \"MultiStepMap\" instead.", BiomeGenName.c_str());
|
||||||
}
|
}
|
||||||
m_BiomeGen = new cBioGenMultiStepMap(Seed);
|
m_BiomeGen = new cBioGenMultiStepMap(Seed);
|
||||||
|
|
||||||
|
/*
|
||||||
|
// Performance-testing:
|
||||||
|
LOGINFO("Measuring performance of cBioGenMultiStepMap...");
|
||||||
|
clock_t BeginTick = clock();
|
||||||
|
for (int x = 0; x < 5000; x++)
|
||||||
|
{
|
||||||
|
cChunkDef::BiomeMap Biomes;
|
||||||
|
m_BiomeGen->GenBiomes(x * 5, x * 5, Biomes);
|
||||||
|
}
|
||||||
|
clock_t Duration = clock() - BeginTick;
|
||||||
|
LOGINFO("cBioGenMultiStepMap for 5000 chunks took %d ticks (%.02f sec)", Duration, (double)Duration / CLOCKS_PER_SEC);
|
||||||
|
//*/
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a cache, if requested:
|
// Add a cache, if requested:
|
||||||
|
|
Loading…
Reference in New Issue