# Function: statistics()

> > **statistics**\<`Ts`\>(`generator`, `classify`, `params?`): `void`

# Function: statistics()

> **statistics**\<`Ts`\>(`generator`, `classify`, `params?`): `void`

Defined in: [packages/fast-check/src/check/runner/Sampler.ts:95](https://github.com/dubzzz/fast-check/blob/4663db899d411b24434189b8e560b5ecefc93f23/packages/fast-check/src/check/runner/Sampler.ts#L95)

Gather useful statistics concerning generated values

Print the result in `console.log` or `params.logger` (if defined)

## Type Parameters

| Type Parameter |
| ------ |
| `Ts` |

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `generator` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\> \| [`Arbitrary`](../classes/Arbitrary.md)\<`Ts`\> | [IProperty](../interfaces/IProperty.md) or [Arbitrary](../classes/Arbitrary.md) to extract the values from |
| `classify` | (`v`) => `string` \| `string`[] | Classifier function that can classify the generated value in zero, one or more categories (with free labels) |
| `params?` | `number` \| [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Integer representing the number of values to generate or `Parameters` as in [assert](assert.md) |

## Returns

`void`

## Example

```typescript
fc.statistics(
    fc.nat(999),
    v => v < 100 ? 'Less than 100' : 'More or equal to 100',
    {numRuns: 1000, logger: console.log});
// Classify 1000 values generated by fc.nat(999) into two categories:
// - Less than 100
// - More or equal to 100
// The output will be sent line by line to the logger
```

## Remarks

Since 0.0.6
