# Sandbox.Services.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.

- Kind: class
- Namespace: `Sandbox.Services`
- Assembly: `Sandbox.Engine`

## Constructors

- [`BenchmarkSystem`](/api/Sandbox.Services.BenchmarkSystem/.ctor)

## Methods

- [`Finish`](/api/Sandbox.Services.BenchmarkSystem/Finish): Called to close a benchmark off
- [`Sample`](/api/Sandbox.Services.BenchmarkSystem/Sample): Should be called in update every frame
- [`SendAsync`](/api/Sandbox.Services.BenchmarkSystem/SendAsync): Finish this benchmark session and send it off to the backend
- [`SetMetric`](/api/Sandbox.Services.BenchmarkSystem/SetMetric): Set a custom metric, like load time, shutdown time etc
- [`Start`](/api/Sandbox.Services.BenchmarkSystem/Start): Called to start a benchmark
