# Stats

**URL:** https://heroiclabs.com/docs/hiro/server-framework/stats/
**Keywords:** stats, hiro
**Categories:** hiro, stats, server-framework

---


# Stats

Read more about the Stats system in Hiro [here](../../concepts/stats/).

## Functions

### List

List all private stats for one or more users.

```go
userIds := []string{"userId_001", "userId_002"}

stats, err := systems.GetStatsSystem().List(ctx, logger, nk, userIds)
if err != nil {
  return err
}
```

### Update

Update stats for a particular user.

```go
userId := "userId"
publicStats := []*hiro.StatUpdate{{
  Name:     "strength",
  Value:    1,
  Operator: hiro.StatUpdateOperator_STAT_UPDATE_OPERATOR_DELTA,
}}
privateStats := []*hiro.StatUpdate{{
  Name:     "dexterity",
  Value:    5,
  Operator: hiro.StatUpdateOperator_STAT_UPDATE_OPERATOR_SET,
}}

stats, err := systems.GetStatsSystem().Update(ctx, logger, nk, userId, publicStats, privateStats)
if err != nil {
  return err
}
```