Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions features/app_start_spans.feature
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,66 @@ Scenario: App Start Clear Customisation
* the trace "Bugsnag-Span-Sampling" header equals "1:4"
* the trace payload field "resourceSpans.0.scopeSpans.0.spans.3.name" equals "[AppStart/UnityRuntime]"

@android_only
Scenario: App Start with metrics
When I run the game in the "AppStartWithMetrics" state
And I wait to receive 4 spans
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use the new step in Maze Runner to get better diagnostics if it fails to receive all the expected spans:

Suggested change
And I wait to receive 4 spans
And I wait to receive a span named "[AppStart/UnityRuntime]"
And I wait to receive a span named "[AppStartPhase/LoadAssemblies]"
And I wait to receive a span named "[AppStartPhase/SplashScreen]"
And I wait to receive a span named "[AppStartPhase/LoadFirstScene]"


# rendering metrics on the app-start span
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.total_frames" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_average" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_maximum" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_minimum" greater than 0

# memory metrics on the app-start span (arrayed samples)
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.memory.timestamps" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.system.memory.spaces.device.size" greater than 0
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.memory.spaces.device.used" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.system.memory.spaces.art.size" greater than 0
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.memory.spaces.art.used" with at least 5 elements

# CPU metrics on the app-start span
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_timestamps" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_total" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has double array attribute "bugsnag.system.cpu_measures_total" containing valid percentages
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_main_thread" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has double array attribute "bugsnag.system.cpu_measures_main_thread" containing valid percentages
* the span named "[AppStart/UnityRuntime]" has double attribute "bugsnag.system.cpu_mean_total" that is a valid percentage
* the span named "[AppStart/UnityRuntime]" has double attribute "bugsnag.system.cpu_mean_main_thread" that is a valid percentage

# phase spans should also carry the memory metrics
* the span named "[AppStartPhase/LoadAssemblies]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStartPhase/SplashScreen]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStartPhase/LoadFirstScene]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0

@ios_only
Scenario: App Start with metrics
When I run the game in the "AppStartWithMetrics" state
And I wait to receive 4 spans
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And I wait to receive 4 spans
And I wait to receive a span named "[AppStart/UnityRuntime]"
And I wait to receive a span named "[AppStartPhase/LoadAssemblies]"
And I wait to receive a span named "[AppStartPhase/SplashScreen]"
And I wait to receive a span named "[AppStartPhase/LoadFirstScene]"


# rendering metrics on the app-start span
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.total_frames" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_average" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_maximum" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.rendering.fps_minimum" greater than 0

# memory metrics on the app-start span (arrayed samples)
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.memory.timestamps" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStart/UnityRuntime]" has integer attribute "bugsnag.system.memory.spaces.device.size" greater than 0
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.memory.spaces.device.used" with at least 5 elements

# CPU metrics on the app-start span
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_timestamps" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_total" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has double array attribute "bugsnag.system.cpu_measures_total" containing valid percentages
* the span named "[AppStart/UnityRuntime]" has array attribute "bugsnag.system.cpu_measures_main_thread" with at least 5 elements
* the span named "[AppStart/UnityRuntime]" has double array attribute "bugsnag.system.cpu_measures_main_thread" containing valid percentages
* the span named "[AppStart/UnityRuntime]" has double attribute "bugsnag.system.cpu_mean_total" that is a valid percentage
* the span named "[AppStart/UnityRuntime]" has double attribute "bugsnag.system.cpu_mean_main_thread" that is a valid percentage

# phase spans should also carry the memory metrics
* the span named "[AppStartPhase/LoadAssemblies]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStartPhase/SplashScreen]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
* the span named "[AppStartPhase/LoadFirstScene]" has integer attribute "bugsnag.device.physical_device_memory" greater than 0
Loading