# PerfCountersSnapshot

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/diagnostics/perf_counters/struct-perfcounterssnapshot/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct PerfCountersSnapshot
```

The counters of this thread at one moment, or the difference of two such
moments (`since`). Without the feature `perf-counters` it
holds nothing and every count reads zero.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L523)

## Members

- [`get`](#function-get)
- [`virtual_calls`](#function-virtual_calls)
- [`virtual_calls_total`](#function-virtual_calls_total)
- [`since`](#function-since)
- [`plus`](#function-plus)
- [`report`](#function-report)
- [`report_per`](#function-report_per)

<a id="function-get"></a>

### get

```rust
fn get(self: &Self, counter: PerfCounter) -> u64
```

The count of `counter`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L554)

<a id="function-virtual_calls"></a>

### virtual_calls

```rust
fn virtual_calls(self: &Self) -> &[(&'static str, u64)]
```

The virtual calls by member (`"Class::member"`, the class that
declares the member), the most called first.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L568)

<a id="function-virtual_calls_total"></a>

### virtual_calls_total

```rust
fn virtual_calls_total(self: &Self) -> u64
```

The number of virtual calls, of every member.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L580)

<a id="function-since"></a>

### since

```rust
fn since(self: &Self, earlier: &PerfCountersSnapshot) -> PerfCountersSnapshot
```

What was counted between `earlier` and this snapshot.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L585)

<a id="function-plus"></a>

### plus

```rust
fn plus(self: &Self, other: &PerfCountersSnapshot) -> PerfCountersSnapshot
```

These counts and the ones of `other` together: the sum of what was
counted over several stretches of work.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L614)

<a id="function-report"></a>

### report

```rust
fn report(self: &Self) -> String
```

The counters, one a line; then the virtual calls by member.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L639)

<a id="function-report_per"></a>

### report_per

```rust
fn report_per(self: &Self, divisor: u64, unit: &str) -> String
```

The counters with, next to each, the count divided by `divisor` (the
rows recycled, the frames rendered): `unit` names what it counts.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/diagnostics/perf_counters.rs#L645)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Display`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
