diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-17 22:37:18 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-02-17 22:37:18 +0200 |
commit | bb6da9c67e6ee7a257f764d2d3e26cc0a276e5c7 (patch) | |
tree | e8f3509e6387da47932959bbb3668428b975142c /src/macos_fw.c | |
parent | 07fa57ac884f0581e4f4759bf75bff05d867ce4e (diff) |
lower the memory footprint of dimensions by 1.5KB
Diffstat (limited to 'src/macos_fw.c')
-rw-r--r-- | src/macos_fw.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/src/macos_fw.c b/src/macos_fw.c index a62aa7a7e2..7ff255c8e0 100644 --- a/src/macos_fw.c +++ b/src/macos_fw.c @@ -140,8 +140,8 @@ int do_macos_iokit(int update_every, usec_t dt) { if (unlikely(!st)) { st = rrdset_create("disk", diskstat.name, NULL, diskstat.name, "disk.io", "Disk I/O Bandwidth", "kilobytes/s", 2000, update_every, RRDSET_TYPE_AREA); - rrddim_add(st, "reads", NULL, 1, 1024, RRDDIM_INCREMENTAL); - rrddim_add(st, "writes", NULL, -1, 1024, RRDDIM_INCREMENTAL); + rrddim_add(st, "reads", NULL, 1, 1024, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "writes", NULL, -1, 1024, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -166,8 +166,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_ops", diskstat.name, NULL, diskstat.name, "disk.ops", "Disk Completed I/O Operations", "operations/s", 2001, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "writes", NULL, -1, 1, RRDDIM_INCREMENTAL); + rrddim_add(st, "reads", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "writes", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -192,7 +192,7 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_util", diskstat.name, NULL, diskstat.name, "disk.util", "Disk Utilization Time", "% of time working", 2004, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; - rrddim_add(st, "utilization", NULL, 1, 10000000, RRDDIM_INCREMENTAL); + rrddim_add(st, "utilization", NULL, 1, 10000000, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -217,8 +217,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_iotime", diskstat.name, NULL, diskstat.name, "disk.iotime", "Disk Total I/O Time", "milliseconds/s", 2022, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "reads", NULL, 1, 1000000, RRDDIM_INCREMENTAL); - rrddim_add(st, "writes", NULL, -1, 1000000, RRDDIM_INCREMENTAL); + rrddim_add(st, "reads", NULL, 1, 1000000, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "writes", NULL, -1, 1000000, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -241,8 +241,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_await", diskstat.name, NULL, diskstat.name, "disk.await", "Average Completed I/O Operation Time", "ms per operation", 2005, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "reads", NULL, 1, 1000000, RRDDIM_ABSOLUTE); - rrddim_add(st, "writes", NULL, -1, 1000000, RRDDIM_ABSOLUTE); + rrddim_add(st, "reads", NULL, 1, 1000000, RRDDIM_ALGORITHM_ABSOLUTE); + rrddim_add(st, "writes", NULL, -1, 1000000, RRDDIM_ALGORITHM_ABSOLUTE); } else rrdset_next(st); @@ -259,8 +259,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_avgsz", diskstat.name, NULL, diskstat.name, "disk.avgsz", "Average Completed I/O Operation Bandwidth", "kilobytes per operation", 2006, update_every, RRDSET_TYPE_AREA); st->isdetail = 1; - rrddim_add(st, "reads", NULL, 1, 1024, RRDDIM_ABSOLUTE); - rrddim_add(st, "writes", NULL, -1, 1024, RRDDIM_ABSOLUTE); + rrddim_add(st, "reads", NULL, 1, 1024, RRDDIM_ALGORITHM_ABSOLUTE); + rrddim_add(st, "writes", NULL, -1, 1024, RRDDIM_ALGORITHM_ABSOLUTE); } else rrdset_next(st); @@ -277,7 +277,7 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_svctm", diskstat.name, NULL, diskstat.name, "disk.svctm", "Average Service Time", "ms per operation", 2007, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "svctm", NULL, 1, 1000000, RRDDIM_ABSOLUTE); + rrddim_add(st, "svctm", NULL, 1, 1000000, RRDDIM_ALGORITHM_ABSOLUTE); } else rrdset_next(st); @@ -304,8 +304,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_find_bytype("system", "io"); if (unlikely(!st)) { st = rrdset_create("system", "io", NULL, "disk", NULL, "Disk I/O", "kilobytes/s", 150, update_every, RRDSET_TYPE_AREA); - rrddim_add(st, "in", NULL, 1, 1024, RRDDIM_INCREMENTAL); - rrddim_add(st, "out", NULL, -1, 1024, RRDDIM_INCREMENTAL); + rrddim_add(st, "in", NULL, 1, 1024, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "out", NULL, -1, 1024, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -347,10 +347,10 @@ int do_macos_iokit(int update_every, usec_t dt) { update_every, RRDSET_TYPE_STACKED); - rrddim_add(st, "avail", NULL, mntbuf[i].f_bsize, GIGA_FACTOR, RRDDIM_ABSOLUTE); - rrddim_add(st, "used", NULL, mntbuf[i].f_bsize, GIGA_FACTOR, RRDDIM_ABSOLUTE); + rrddim_add(st, "avail", NULL, mntbuf[i].f_bsize, GIGA_FACTOR, RRDDIM_ALGORITHM_ABSOLUTE); + rrddim_add(st, "used", NULL, mntbuf[i].f_bsize, GIGA_FACTOR, RRDDIM_ALGORITHM_ABSOLUTE); rrddim_add(st, "reserved_for_root", "reserved for root", mntbuf[i].f_bsize, GIGA_FACTOR, - RRDDIM_ABSOLUTE); + RRDDIM_ALGORITHM_ABSOLUTE); } else rrdset_next(st); @@ -369,9 +369,9 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("disk_inodes", mntbuf[i].f_mntonname, NULL, mntbuf[i].f_mntonname, "disk.inodes", title, "Inodes", 2024, update_every, RRDSET_TYPE_STACKED); - rrddim_add(st, "avail", NULL, 1, 1, RRDDIM_ABSOLUTE); - rrddim_add(st, "used", NULL, 1, 1, RRDDIM_ABSOLUTE); - rrddim_add(st, "reserved_for_root", "reserved for root", 1, 1, RRDDIM_ABSOLUTE); + rrddim_add(st, "avail", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE); + rrddim_add(st, "used", NULL, 1, 1, RRDDIM_ALGORITHM_ABSOLUTE); + rrddim_add(st, "reserved_for_root", "reserved for root", 1, 1, RRDDIM_ALGORITHM_ABSOLUTE); } else rrdset_next(st); @@ -402,8 +402,8 @@ int do_macos_iokit(int update_every, usec_t dt) { if (unlikely(!st)) { st = rrdset_create("net", ifa->ifa_name, NULL, ifa->ifa_name, "net.net", "Bandwidth", "kilobits/s", 7000, update_every, RRDSET_TYPE_AREA); - rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_INCREMENTAL); - rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_INCREMENTAL); + rrddim_add(st, "received", NULL, 8, 1024, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "sent", NULL, -8, 1024, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -418,10 +418,10 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("net_packets", ifa->ifa_name, NULL, ifa->ifa_name, "net.packets", "Packets", "packets/s", 7001, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "received", NULL, 1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "multicast_received", NULL, 1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "multicast_sent", NULL, -1, 1, RRDDIM_INCREMENTAL); + rrddim_add(st, "received", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "sent", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "multicast_received", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "multicast_sent", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -438,8 +438,8 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("net_errors", ifa->ifa_name, NULL, ifa->ifa_name, "net.errors", "Interface Errors", "errors/s", 7002, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "outbound", NULL, -1, 1, RRDDIM_INCREMENTAL); + rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "outbound", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -454,7 +454,7 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("net_drops", ifa->ifa_name, NULL, ifa->ifa_name, "net.drops", "Interface Drops", "drops/s", 7003, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_INCREMENTAL); + rrddim_add(st, "inbound", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); @@ -468,9 +468,9 @@ int do_macos_iokit(int update_every, usec_t dt) { st = rrdset_create("net_events", ifa->ifa_name, NULL, ifa->ifa_name, "net.events", "Network Interface Events", "events/s", 7006, update_every, RRDSET_TYPE_LINE); st->isdetail = 1; - rrddim_add(st, "frames", NULL, 1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "collisions", NULL, -1, 1, RRDDIM_INCREMENTAL); - rrddim_add(st, "carrier", NULL, -1, 1, RRDDIM_INCREMENTAL); + rrddim_add(st, "frames", NULL, 1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "collisions", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); + rrddim_add(st, "carrier", NULL, -1, 1, RRDDIM_ALGORITHM_INCREMENTAL); } else rrdset_next(st); |