openclimatefix / pv-site-api

Site specific API for PV forecasting
5 stars 8 forks source link

Add/log memory usage #175

Closed BraunRudolf closed 1 week ago

BraunRudolf commented 2 weeks ago

Pull Request

Description

Solving: Issue: log memory usage #171

add memory logging in pv_stie_api.cache.remove_old_cache

add requirement psutil

add tests/test_cache.py

new requirement: psutil

Fixes #171

How Has This Been Tested?

Unit-Test

Checklist:

sentry-io[bot] commented 2 weeks ago

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: pv_site_api/cache.py

Function Unhandled Issue
remove_old_cache RuntimeError: dictionary changed size during iteration /sites/pv_...
Event Count: 1
remove_old_cache RuntimeError: dictionary changed size during iteration /sites/{site_uuid}/pv_fo...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

peterdudfield commented 1 week ago

Thank you @BraunRudolf