Don't forget to check the bottom of my answer too.
You will want to follow the Performance Testing Guide which instructs in details how to prepare your system for Performance Testing. It takes a lot of into account: From the impact of your hardware, installing your OS fresh, tweaking it, capturing a baseline trace to the actual testing. Definitely worth reading if you take scientific measuring seriously. Here is its extensive table of contents:
Introduction
Windows Performance Testing Challenges
Background Tasks
Scheduled Tasks
Memory Management and SuperFetch
Performance versus Power
Performance Test Design Considerations
Automating User Presence
Testing End-User Scenarios
Effects of Hardware on Performance
CPU
RAM
Type of Storage Device
Graphics Subsystem
Recommended Test Methodology
Step 1. Set Up the Operating System
Step 2. Set Up the Test Software
Step 3. Run Windows Update
Step 4. Reboot the System
Step 5. Download Windows Defender Definition Files
Step 6. Disable Windows Update
Step 7. Calculate the Windows Experience Index
Step 8. Reboot the System
Step 9. Let Windows Defender Build a System File Cache
Step 10. Disable User Account Control
Step 11. Complete Indexing
Step 12. Use SuperFetch to Train the System
Step 13. Complete Idle-Time Tasks
Step 14. Disable System Restore
Step 15. Review Scheduled Tasks
Step 16. Run the Test
Best Practices
Best Practices for Designing Performance Tests
Best Practices for Running Performance Tests
Resources
Appendix. Scheduled Tasks
You will also want to check out GPUView which can definitely help ironing out performance issues in your ray tracer. If you do, the presentations listed at the bottom go into quite some details, perhaps you might be able to find its video recordings if the slides aren't enough.