Guest User

Untitled

a guest
Jul 7th, 2026
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. # Configuration
  2. $primePath = "C:\tools\prime95\prime95.exe"
  3. $primeDir = "C:\tools\prime95"
  4. $totalDurationMinutes = 120 # 2 hours
  5. $intervalMinutes = 2 # 2 minutes load, 2 minutes rest
  6.  
  7. # Calculate total loops (Each loop has 1 load and 1 rest interval = 4 minutes total)
  8. $loopDurationMinutes = $intervalMinutes * 2
  9. $totalLoops = $totalDurationMinutes / $loopDurationMinutes
  10.  
  11. # Counter for successful heat cycles
  12. $completedCycles = 0
  13.  
  14. Write-Host "Starting Prime95 cyclic test for $totalDurationMinutes minutes ($totalLoops expected cycles)..." -ForegroundColor Cyan
  15. Write-Host "--------------------------------------------------------"
  16.  
  17. for ($i = 1; $i -le $totalLoops; $i++) {
  18. Write-Host "=== Cycle $i of $totalLoops ===" -ForegroundColor Yellow
  19.  
  20. # --- LOAD PHASE ---
  21. Write-Host "$(Get-Date -Format 'HH:mm:ss') - Starting Prime95 (Load Phase)..." -ForegroundColor Green
  22.  
  23. # -t launches Prime95 directly into the torture test using existing prime.txt settings
  24. $primeProcess = Start-Process -FilePath $primePath -WorkingDirectory $primeDir -ArgumentList "-t" -PassThru
  25.  
  26. # Wait for 2 minutes of heavy load
  27. Start-Sleep -Seconds ($intervalMinutes * 60)
  28.  
  29. # --- REST PHASE ---
  30. Write-Host "$(Get-Date -Format 'HH:mm:ss') - Stopping Prime95 (Rest Phase)..." -ForegroundColor Blue
  31.  
  32. # Gracefully stop the process if it's still running
  33. if ($primeProcess -and -not $primeProcess.HasExited) {
  34. Stop-Process -Id $primeProcess.Id -Force
  35. }
  36.  
  37. # Increment our heat cycle counter now that the load phase for this cycle is done
  38. $completedCycles++
  39.  
  40. # Wait for 2 minutes (Cooldown) - Skip the final rest if we hit the total time limit
  41. if ($i -lt $totalLoops) {
  42. Write-Host "Holding/resting for $intervalMinutes minutes..." -ForegroundColor Gray
  43. Start-Sleep -Seconds ($intervalMinutes * 60)
  44. }
  45. }
  46.  
  47. # --- SUMMARY END OF SCRIPT ---
  48. Write-Host "--------------------------------------------------------" -ForegroundColor Cyan
  49. Write-Host "$(Get-Date -Format 'HH:mm:ss') - Cyclic test complete!" -ForegroundColor Cyan
  50. Write-Host "Total completed heat cycles: $completedCycles" -ForegroundColor Magenta
  51. Write-Host "--------------------------------------------------------" -ForegroundColor Cyan
Advertisement
Add Comment
Please, Sign In to add comment