ziutek / rrd

Bindings to rrdtool
Other
147 stars 44 forks source link

Handle numeric DS names #16

Closed vbatoufflet closed 9 years ago

vbatoufflet commented 10 years ago

Hi,

I just made a change in order to handle fully numeric DS names in RRD entries. By example, having:

ds[42].index = 0
ds[42].type = "DERIVE"
ds[42].minimal_heartbeat = 600
ds[42].min = 0.0000000000e+00
ds[42].max = NaN
ds[42].last_ds = "57447256"
ds[42].value = 1.4651162791e+01
ds[42].unknown_sec = 0

currently fills ds.index map with a lot of []interface{}(nil).

With the patch, we verify that kname doesn't start with ds., avoiding the Atoi conversion for ds.* entries and keeping the -1 key id.

Let me know what do you think of this patch.

Regards,

vbatoufflet commented 9 years ago

Hi @ziutek,

Did you had the time to take a look at this PR?

Please let me know if something is wrong with it.

Best regards,

Vincent

ziutek commented 9 years ago

I missed this issue. LGTM.

vbatoufflet commented 9 years ago

Great, thank you!