mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-07-27 15:18:56 +00:00
Fix critical metrics calculation and aggressive disk flushing
� CRITICAL METRICS FIXES: ✅ DURATION & TIMING FIXES: • Fixed Duration showing 00:00:00 by calling Complete() before CreateResult() • Proper EndTime calculation ensures accurate duration metrics • AverageSpeed now calculated correctly from actual duration • Fixed metric calculation order to ensure proper timing ✅ AGGRESSIVE DISK FLUSHING: • Reduced flush threshold from 5MB to 1MB for more frequent updates • Time-based flushing every 500ms (was 1000ms) for real-time visibility • Added AggressiveFlush() method with reflection-based ZipArchive flushing • Force OS-level flush with FileStream.Flush(true) after each file • GC.Collect() to ensure all buffers are released immediately ✅ REAL-TIME FILE SIZE UPDATES: • ZipArchive internal stream flushing via reflection • Hybrid flushing: 1MB threshold OR 500ms intervals • Aggressive flush after every file completion • Multiple fallback flush strategies for reliability ✅ TECHNICAL IMPROVEMENTS: • Reflection-based access to ZipArchive._archiveStream for forced flushing • Error handling with fallback flush strategies • Proper Complete() call timing before result creation • Enhanced error recovery during flush operations � EXPECTED RESULTS: • Zip files now show real-time size growth every 1MB or 500ms • Accurate Duration, EndTime, and AverageSpeed metrics • Proper CompressionRatio and SpaceSaved calculations • Visible progress on file system during long operations No more 0-duration metrics or static file sizes!
This commit is contained in:
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user