mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	debug
This commit is contained in:
		| @@ -127,13 +127,13 @@ void HOT Scheduler::set_timer_common_(Component *component, SchedulerItem::Type | ||||
|     item = std::move(this->scheduler_item_pool_.back()); | ||||
|     this->scheduler_item_pool_.pop_back(); | ||||
| #ifdef ESPHOME_DEBUG_SCHEDULER | ||||
|     ESP_LOGVV(TAG, "Reused item from pool (pool size now: %zu)", this->scheduler_item_pool_.size()); | ||||
|     ESP_LOGD(TAG, "Reused item from pool (pool size now: %zu)", this->scheduler_item_pool_.size()); | ||||
| #endif | ||||
|   } else { | ||||
|     // Allocate new if pool is empty | ||||
|     item = make_unique<SchedulerItem>(); | ||||
| #ifdef ESPHOME_DEBUG_SCHEDULER | ||||
|     ESP_LOGVV(TAG, "Allocated new item (pool empty)"); | ||||
|     ESP_LOGD(TAG, "Allocated new item (pool empty)"); | ||||
| #endif | ||||
|   } | ||||
|   item->component = component; | ||||
| @@ -819,11 +819,11 @@ void Scheduler::recycle_item_(std::unique_ptr<SchedulerItem> item) { | ||||
|     item->clear_dynamic_name(); | ||||
|     this->scheduler_item_pool_.push_back(std::move(item)); | ||||
| #ifdef ESPHOME_DEBUG_SCHEDULER | ||||
|     ESP_LOGVV(TAG, "Recycled item to pool (pool size now: %zu)", this->scheduler_item_pool_.size()); | ||||
|     ESP_LOGD(TAG, "Recycled item to pool (pool size now: %zu)", this->scheduler_item_pool_.size()); | ||||
| #endif | ||||
|   } else { | ||||
| #ifdef ESPHOME_DEBUG_SCHEDULER | ||||
|     ESP_LOGVV(TAG, "Pool full (size: %zu), deleting item", this->scheduler_item_pool_.size()); | ||||
|     ESP_LOGD(TAG, "Pool full (size: %zu), deleting item", this->scheduler_item_pool_.size()); | ||||
| #endif | ||||
|   } | ||||
|   // else: unique_ptr will delete the item when it goes out of scope | ||||
|   | ||||
		Reference in New Issue
	
	Block a user