Skip to content

🧪 Pickups Diagnostics — Performance Smoke Tests

This folder contains diagnostics-only performance smoke tests for the Pickups system.

These scripts are designed to help you:

  • Profile core pickup behaviour under stress
  • Understand how decorator depth affects cost
  • Observe cooldown and apply-path overhead
  • Detect allocation issues or misuse patterns

👉 These are developer diagnostics tools, not gameplay systems.


⚠️ Important

These scripts are NOT benchmarks and NOT performance guarantees.

They exist to:

  • Expose scaling behaviour
  • Highlight misuse patterns
  • Provide repeatable profiling scenarios

They do not simulate full gameplay conditions.


🧠 What These Tests Cover

✔ PickupEffectPerfSmoke

Tests the core application path:

  • PickupEffectRunner.Apply(...)
  • Null-damageable vs required-damageable paths
  • Cooldown-enabled vs no-cooldown behaviour
  • Single-owner vs multi-owner workloads

👉 Use this to understand the baseline cost of applying effects.


✔ PickupDecoratorDepthPerfSmoke

Tests decorator chain depth scaling:

  • 0 → N decorator layers
  • Linear cost growth across chain depth
  • Allocation behaviour under deep wrapping

👉 Use this to understand how stacked decorators affect performance.


🧪 What These Tests Do NOT Cover

These diagnostics do not include:

  • Real gameplay logic
  • UI updates or animation cost
  • VFX or audio overhead
  • Network / multiplayer behaviour
  • Custom user-defined effect complexity

👉 Real-world performance will depend on what you build on top.


📊 How to Use

  1. Create an empty scene
  2. Add one of the smoke test components to a GameObject
  3. Press Play
  4. Open the Unity Profiler:
  5. CPU Usage
  6. Timeline
  7. GC Alloc
  8. Adjust inspector values:
  9. Calls per run
  10. Instance count
  11. Decorator depth
  12. Cooldown settings

👉 Observe how behaviour scales under controlled conditions.


🧠 Interpreting Results

These tests are intended to answer questions like:

  • “Does decorator depth scale linearly?”
  • “Are cooldown checks introducing allocations?”
  • “How expensive is repeated effect application?”

They are not intended to answer:

  • “Is this system fast enough for my game?”
  • “What FPS will I get in production?”

⚠️ Common Misuse Patterns

If performance degrades in real projects but not here, typical causes are:

  • Deep or complex decorator chains
  • Expensive logic inside custom effects
  • Per-frame UI updates tied to pickups
  • Heavy VFX/audio work triggered on apply
  • Overuse of pickups as high-frequency systems

🧹 Safe to Remove

This folder is optional.

Removing it will not affect:

  • The Pickups runtime system
  • Any other RevFramework modules

🧠 Summary

These diagnostics exist to answer:

“What does the Pickups system cost under controlled stress?”

They provide:

  • Repeatable stress scenarios
  • Clear scaling behaviour
  • Allocation visibility

Use them to profile and understand — not to benchmark or validate final performance.