add tracing for performance profiling
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <set>
|
||||
|
||||
#include "SurfaceMask.h"
|
||||
#include "tracing.h"
|
||||
|
||||
BuildingSystem::BuildingSystem(const GameConfig& config,
|
||||
BeltSystem& belts,
|
||||
@@ -410,6 +411,7 @@ void BuildingSystem::setShipLayout(BuildingId id, const ShipLayoutConfig& layout
|
||||
|
||||
void BuildingSystem::tickConstruction(Tick currentTick)
|
||||
{
|
||||
TRACE();
|
||||
if (m_constructionQueue.empty())
|
||||
{
|
||||
return;
|
||||
@@ -516,6 +518,7 @@ void BuildingSystem::tickConstruction(Tick currentTick)
|
||||
|
||||
void BuildingSystem::tickBeltPull()
|
||||
{
|
||||
TRACE();
|
||||
for (Building& building : m_buildings)
|
||||
{
|
||||
// HQ: pull building_block items and add to global stock.
|
||||
@@ -591,6 +594,7 @@ void BuildingSystem::tickBeltPull()
|
||||
|
||||
void BuildingSystem::tickProduction(Tick currentTick)
|
||||
{
|
||||
TRACE();
|
||||
for (Building& building : m_buildings)
|
||||
{
|
||||
// Skip types without a recipe-based production loop.
|
||||
@@ -694,6 +698,7 @@ void BuildingSystem::tickProduction(Tick currentTick)
|
||||
|
||||
void BuildingSystem::tickShipyardProduction(Tick currentTick)
|
||||
{
|
||||
TRACE();
|
||||
for (Building& building : m_buildings)
|
||||
{
|
||||
if (building.type != BuildingType::Shipyard)
|
||||
@@ -795,6 +800,7 @@ void BuildingSystem::tickShipyardProduction(Tick currentTick)
|
||||
|
||||
void BuildingSystem::tickBeltPush()
|
||||
{
|
||||
TRACE();
|
||||
for (Building& building : m_buildings)
|
||||
{
|
||||
if (building.outputBuffer.items.empty())
|
||||
|
||||
Reference in New Issue
Block a user