# WireStats: sent property

> The sent read-only property of the WireStats interface counts the messages and bytes the client has sent, by client message type.

The **`sent`** read-only property of the [`WireStats`](/docs/client/wire-stats) interface counts the messages and bytes the client has sent since it was created, by client message type.

## Value

An object whose keys are client message types and whose values are objects with these properties:

`messages`
: The number of messages of the type sent.

`bytes`
: Their total size in bytes.

A type is a key once the client has sent a message of it. The types include `input`, or `typedInput` with a schema's [input kind](/docs/client/guides/prediction#compact-inputs), `ping`, `write` (owner writes), `message`, `unreliable`, `call` and `hello`.

## Description

`sent.input.bytes` is what prediction inputs have cost, and the sum over every type is [`bytesOut`](/docs/client/wire-stats/bytesout).

## Examples

### Comparing input encodings

The client logs the average size of an input message, to compare JSON inputs with a schema's input kind.

```ts
// input-size.ts
import type { ReadyRoomClient } from "@irtio/client";

export function inputSize(room: ReadyRoomClient) {
  const inputs = room.stats.sent.typedInput ?? room.stats.sent.input;
  if (!inputs) console.log("no inputs sent");
  else console.log(`${(inputs.bytes / inputs.messages).toFixed(1)} bytes an input message`);
}
```

Each input message repeats the last 4 inputs, so a single lost message loses no input, and its size is that of up to 4 inputs.

## See also

- [`WireStats.received`](/docs/client/wire-stats/received)
- [Compact inputs](/docs/client/guides/prediction#compact-inputs)
