Skip to content

Commit

Permalink
docs: update readme (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanbohan authored Apr 19, 2023
1 parent 600f4fb commit c175a0f
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ you can visit [Example][example] for usage details.
## Usage

#### Datatype Supported
```go
int32, int64, int (as int64),
uint32, uint64, uint (as uint64),
float32, float64,
bool,
[]byte,
string,
time.Time,
```

```go
// Attention! The following data types may cause conversion, not recommended.
int8, int16 // stored as int32
uint8, uint16 // stored as uint32
```
- int32
- int64
- int (as int64)
- uint32
- uint64
- uint (as uint64)
- float32
- float64
- bool
- []byte
- string
- time.Time
- int8, int16 (as int32) // not recommended
- uint8, uint16 (as uint32) // not recommended

#### Precision for Timestamp

The default precision is `Millisecond`, you can set a different precision,
once the precision is setted, you can not change it any more.

- `Second`
- `Millisecond`
- `Microsecond`
- `Nanosecond`
- time.Second
- time.Millisecond
- time.Microsecond
- time.Nanosecond

```go
metric.SetTimePrecision(time.Microsecond)
Expand Down

0 comments on commit c175a0f

Please sign in to comment.