Api Sandbox Services BenchmarkSystem
class

BenchmarkSystem

public class BenchmarkSystem

Allows access to stats for the current game. Stats are defined by the game's author and can be used to track anything from player actions to performance metrics. They are how you submit data to leaderboards.

Constructors

BenchmarkSystem()

Methods

Void Start(String name)

Called to start a benchmark

Void SetMetric(String name, Double metric)

Set a custom metric, like load time, shutdown time etc

name
metric
Void Finish()

Called to close a benchmark off

Void Sample()

Should be called in update every frame

Task<Guid> SendAsync(CancellationToken token = null)

Finish this benchmark session and send it off to the backend

Assembly: Sandbox.Engine Namespace: Sandbox.Services Full Name: Sandbox.Services.BenchmarkSystem