mirror of
https://github.com/godotengine/godot-benchmarks.git
synced 2025-12-31 09:49:13 +03:00
- Add wall clock time measurement on benchmarks. - Allow tests to not have a predefined time limit. - This is required for scripting tests. - Fix culling tests not reporting GPU time.
21 lines
385 B
GDScript
21 lines
385 B
GDScript
extends Node
|
|
|
|
const ITERATIONS = 80_000
|
|
|
|
|
|
func _ready():
|
|
var array: PackedStringArray = PackedStringArray()
|
|
for i in ITERATIONS:
|
|
# Insert elements.
|
|
array.push_back(str("Godot ", i))
|
|
|
|
for i in ITERATIONS:
|
|
# Update elements in order.
|
|
array[i] = ""
|
|
|
|
for _i in ITERATIONS:
|
|
# Delete elements from the front (non-constant complexity).
|
|
array.remove_at(0)
|
|
|
|
Manager.end_test()
|