性能测试评估系统在负载下的表现——在各种条件下衡量速度、可扩展性和稳定性。类型包括负载、压力、峰值和耐久性测试。它对于确保系统可以接受地处理实际(和峰值)使用至关重要。
性能测试衡量什么
Non-functional testing of HOW WELL the system performs (not just correctness):
→ RESPONSE TIME / latency (how fast?), THROUGHPUT (requests/sec handled)
→ SCALABILITY (behavior as load grows), RESOURCE usage (CPU, memory)
→ STABILITY under sustained or extreme load
→ ensures the system meets performance requirements and handles real usage.
性能测试的类型
LOAD testing → expected/normal load → does it meet targets under typical usage?
STRESS testing → BEYOND normal limits → find the breaking point; how it fails/recovers
SPIKE testing → sudden sharp load increase → handles bursts? (e.g. a flash sale)
SOAK / endurance → sustained load over a LONG time → finds memory leaks, degradation
SCALABILITY → how performance changes as load/resources scale
