openclimatefix / pv-site-api

Site specific API for PV forecasting
6 stars 11 forks source link

Add/log memory usage #174

Closed BraunRudolf closed 3 months ago

BraunRudolf commented 3 months 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 3 months 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 👎

BraunRudolf commented 3 months ago

Fixing black formatting