unreal.AutomationPerformaceHelper

class unreal.AutomationPerformaceHelper(outer=None, name='None')

Bases: unreal.Object

Class for use with functional tests which provides various performance measuring features. Recording of basic, unintrusive performance stats. Automatic captures using external CPU and GPU profilers. Triggering and ending of writing full stats to a file.

C++ Source:

  • Module: FunctionalTesting

  • File: FunctionalTest.h

begin_recording(record_name, gpu_budget, render_thread_budget, game_thread_budget)None

Begins recording a new named performance stats record. We start by recording the baseline.

Parameters
  • record_name (str) –

  • gpu_budget (float) –

  • render_thread_budget (float) –

  • game_thread_budget (float) –

begin_recording_baseline(record_name)None

Begins recording a new named performance stats record. We start by recording the baseline

Parameters

record_name (str) –

begin_stats_file(record_name)None

Begins recording stats to a file.

Parameters

record_name (str) –

end_recording()None

Stops recording performance stats.

end_recording_baseline()None

Stops recording the baseline and moves to the main record.

end_stats_file()None

Ends recording stats to a file.

is_current_record_within_game_thread_budget()bool

Is Current Record Within Game Thread Budget

Returns

Return type

bool

is_current_record_within_gpu_budget()bool

Is Current Record Within GPUBudget

Returns

Return type

bool

is_current_record_within_render_thread_budget()bool

Is Current Record Within Render Thread Budget

Returns

Return type

bool

is_recording()bool

Returns true if this stats tracker is currently recording performance stats.

Returns

Return type

bool

on_all_tests_complete()None

Does any final work needed as all tests are complete.

on_begin_tests()None

Does any init work across all tests..

sample(delta_seconds)None

Adds a sample to the stats counters for the current performance stats record.

Parameters

delta_seconds (float) –

start_cpu_profiling()None

Communicates with external profiler to being a CPU capture.

stop_cpu_profiling()None

Communicates with external profiler to end a CPU capture.

tick(delta_seconds)None

Begin basic stat recording

Parameters

delta_seconds (float) –

trigger_gpu_trace_if_record_falls_below_budget()None

Will trigger a GPU trace next time the current test falls below GPU budget.

write_log_file(capture_dir, capture_extension)None

Writes the current set of performance stats records to a csv file in the profiling directory. An additional directory and an extension override can also be used.

Parameters
  • capture_dir (str) –

  • capture_extension (str) –