Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game.profiler.profile() showing negative Time and Avg #33

Open
BradleyB-2020 opened this issue Nov 25, 2024 · 0 comments
Open

Game.profiler.profile() showing negative Time and Avg #33

BradleyB-2020 opened this issue Nov 25, 2024 · 0 comments

Comments

@BradleyB-2020
Copy link

BradleyB-2020 commented Nov 25, 2024

ran Game.profiler.profile(500); via web browser in-game console (chrome) and got the following:

calls		time		avg		function
3700		1388.0		0.375		Room.find
1544		548.5		0.355		Creep.moveTo
2364		337.5		0.143		Creep.harvest
1520		315.2		0.207		Creep.move
1193		259.6		0.218		Creep.moveByPath
813		246.2		0.303		RoomPosition.findClosestByRange
877		171.0		0.195		Creep.upgradeController
327		107.8		0.330		RoomPosition.findPathTo
327		102.7		0.314		Room.findPath
418		60.8		0.145		Creep.build
1520		28.0		0.018		RoomVisual.poly
341		11.9		0.035		Creep.transfer
3022		9.2		0.003		RoomPosition.isNearTo
3		6.7		2.244		StructureSpawn.spawnCreep
1293		3.3		0.003		RoomPosition.inRangeTo
636		1.4		0.002		RoomPosition.isEqualTo
113		0.7		0.006		Creep.say
33		0.5		0.016		StructureSpawn.Spawning
0		0.0		NaN		(tick)
46108		-1202.7		-0.026		RoomPosition.getRangeTo
Avg: 3.49	Total: 1744.31	Ticks: 500

where Room.Position.getRangeTo has -1202.7 Time and -0.026 time.

Not sure if the results may differ if running the same command but on the steam client vs web browser or not. Last time I ran Game.profiler.profile(1000); via steam client and it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant