Skip to content

Commit aeaba32

Browse files
committed
Updated manual
1 parent 47554a2 commit aeaba32

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

MANUAL.md

+24-5
Original file line numberDiff line numberDiff line change
@@ -323,21 +323,40 @@ public class Cpu {
323323
}
324324
```
325325

326-
2. Add @Measurement,@TimeColumn and @Column annotations:
326+
2. Add @Measurement,@TimeColumn and @Column annotations (column names default to field names unless otherwise specified):
327327

328328
```Java
329329
@Measurement(name = "cpu")
330330
public class Cpu {
331331
@TimeColumn
332-
@Column(name = "time")
332+
@Column
333333
private Instant time;
334334
@Column(name = "host", tag = true)
335335
private String hostname;
336-
@Column(name = "region", tag = true)
336+
@Column(tag = true)
337+
private String region;
338+
@Column
339+
private Double idle;
340+
@Column
341+
private Boolean happydevop;
342+
@Column(name = "uptimesecs")
343+
private Long uptimeSecs;
344+
// getters (and setters if you need)
345+
}
346+
```
347+
348+
Alternatively, you can use:
349+
350+
```Java
351+
@Measurement(name = "cpu", allFields = true)
352+
public class Cpu {
353+
@TimeColumn
354+
private Instant time;
355+
@Column(name = "host", tag = true)
356+
private String hostname;
357+
@Column(tag = true)
337358
private String region;
338-
@Column(name = "idle")
339359
private Double idle;
340-
@Column(name = "happydevop")
341360
private Boolean happydevop;
342361
@Column(name = "uptimesecs")
343362
private Long uptimeSecs;

0 commit comments

Comments
 (0)