Repository navigation
Release v0.2.0
Release v0.2.0 - Memory Profiling
Release Date: April 15, 2020
πΎ Memory Profiling
This release adds comprehensive memory tracking capabilities to the profiler.
β¨ New Features
Memory Profiler
- πΎ Real-time memory usage tracking with psutil
- π Peak memory detection using tracemalloc
- π Memory change monitoring per function call
- π System memory information retrieval
- π Average memory consumption tracking
API Enhancements
MemoryProfilerclassprofile_memorydecoratorget_memory_info()for system stats- Visual memory usage reporting
π§ Improvements
- Enhanced profiling results display
- Better memory statistics formatting
- Process memory isolation
π¦ Installation
pip install performance-profiler-optimizer==0.2.0π Usage Example
from performance_profiler import MemoryProfiler
memory_profiler = MemoryProfiler()
memory_profiler.enable()
@memory_profiler.profile_memory
def memory_intensive():
return [i**2 for i in range(1000000)]
memory_intensive()
memory_profiler.print_results()π Example Output
πΎ Memory Profiling Results
========================================
Function: memory_intensive
Calls: 3
Total Memory Allocated: 38.45 MB
Peak Memory: 45.23 MB
Average Memory per Call: 12.82 MB
========================================
Full Changelog: v0.1.0...v0.2.0