Skip to content

Benchmark mode is not available in release builds #3164

Description

@bobtista

Prerequisites

  • I have searched for similar issues and confirmed this is not a duplicate

Game Version

  • Command & Conquer Generals
  • Command & Conquer Generals: Zero Hour
  • Other (please specify below)

Bug Description

Benchmark mode is compiled out of release builds. parseBenchmark and the -benchmark command table entry are inside #if defined(RTS_DEBUG), as are the m_benchmarkTimer field, its BenchmarkTimer INI entry, its initialisation, and the auto-exit in GameEngine::execute that quits the game once the timer expires. Only m_playStats and StatsCollector are available in release, and nothing sets them. So -benchmark is not a recognised option there and the game runs until it is killed, writing no stats.

Release is the configuration performance changes have to be measured in, so there is no supported way to produce a frame rate number for a change.

Reproduction Steps

  1. Build a release configuration.
  2. Start the game with -benchmark 60 and a replay.
  3. Wait past 60 seconds.
  4. The game is still running and no stats file has been written.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DebugIs mostly debug functionalityPerformanceIs a performance concern

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions