Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C# benchmarks not being able to be loaded, and implement the ability to change the benchmark time limit #82

Merged
merged 2 commits into from
Jun 28, 2024
Merged
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
1 change: 1 addition & 0 deletions Benchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

public partial class Benchmark : RefCounted
{
public double benchmark_time = 5e6;
public bool test_render_cpu = false;
public bool test_render_gpu = false;
public bool test_idle = false;
Expand Down
1 change: 1 addition & 0 deletions benchmarks/csharp/physics/RigidBody2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public RigidBody2D()
SquareMesh.Size = new Vector2(20.0f, 20.0f);
CircleMesh.Radius = 10.0f;
CircleMesh.Height = 20.0f;
benchmark_time = 10e6;
test_physics = true;
test_idle = true;
}
Expand Down
1 change: 1 addition & 0 deletions benchmarks/csharp/physics/RigidBody3D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public partial class RigidBody3D : Benchmark

public RigidBody3D()
{
benchmark_time = 10e6;
test_physics = true;
test_idle = true;
}
Expand Down
2 changes: 1 addition & 1 deletion manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func _ready():
set_process(false)

# Register script language compatibility
if Engine.has_singleton("GodotSharp"):
if ClassDB.class_exists(&"CSharpScript"):
languages[".cs"] = {"test_prefix": "Benchmark"}

# Register contents of `benchmarks/` folder automatically.
Expand Down