Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ target/
.benchmark_it/
# Virtualenv for development
.venv*/
venv*/
# Autogenerated files
NOTICE.txt
recipes/ccr/ccr-target-hosts.json
Expand Down
4 changes: 4 additions & 0 deletions osbenchmark/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ def record(self):
collected_node_stats.update(self.jvm_buffer_pool_stats(node_name, node_stats))
if self.include_mem_stats:
collected_node_stats.update(self.jvm_mem_stats(node_name, node_stats))
collected_node_stats.update(self.os_mem_stats(node_name, node_stats))
if self.include_gc_stats:
collected_node_stats.update(self.jvm_gc_stats(node_name, node_stats))
if self.include_network:
Expand Down Expand Up @@ -891,6 +892,9 @@ def jvm_buffer_pool_stats(self, node_name, node_stats):
def jvm_mem_stats(self, node_name, node_stats):
return self.flatten_stats_fields(prefix="jvm_mem", stats=node_stats["jvm"]["mem"])

def os_mem_stats(self, node_name, node_stats):
return self.flatten_stats_fields(prefix="os_mem", stats=node_stats["os"]["mem"])

def jvm_gc_stats(self, node_name, node_stats):
return self.flatten_stats_fields(prefix="jvm_gc", stats=node_stats["jvm"]["gc"])

Expand Down
93 changes: 93 additions & 0 deletions tests/telemetry_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1764,6 +1764,32 @@ class NodeStatsRecorderTests(TestCase):
}
}
},
"os": {
"timestamp": 1655950949872,
"cpu": {"percent": 3, "load_average": {"1m": 3.38, "5m": 3.79, "15m": 3.84}},
"mem": {
"total_in_bytes": 62277025792,
"free_in_bytes": 4934840320,
"used_in_bytes": 57342185472,
"free_percent": 8,
"used_percent": 92,
},
"swap": {"total_in_bytes": 0, "free_in_bytes": 0, "used_in_bytes": 0},
"cgroup": {
"cpuacct": {"control_group": "/", "usage_nanos": 1394207523870751},
"cpu": {
"control_group": "/",
"cfs_period_micros": 100000,
"cfs_quota_micros": 793162,
"stat": {
"number_of_elapsed_periods": 41092415,
"number_of_times_throttled": 41890,
"time_throttled_nanos": 29380593023188,
},
},
"memory": {"control_group": "/", "limit_in_bytes": "62277025792", "usage_in_bytes": "57342185472"},
},
},
"process": {
"timestamp": 1526045135857,
"open_file_descriptors": 312,
Expand Down Expand Up @@ -1888,6 +1914,11 @@ class NodeStatsRecorderTests(TestCase):
"jvm_gc_collectors_young_collection_time_in_millis": 309,
"jvm_gc_collectors_old_collection_count": 2,
"jvm_gc_collectors_old_collection_time_in_millis": 229,
"os_mem_total_in_bytes": 62277025792,
"os_mem_free_in_bytes": 4934840320,
"os_mem_used_in_bytes": 57342185472,
"os_mem_free_percent": 8,
"os_mem_used_percent": 92,
"process_cpu_percent": 10,
"process_cpu_total_in_millis": 56520,
"breakers_parent_limit_size_in_bytes": 726571417,
Expand Down Expand Up @@ -2102,6 +2133,32 @@ def test_stores_all_nodes_stats(self, metrics_store_put_doc):
}
}
},
"os": {
"timestamp": 1655950949872,
"cpu": {"percent": 3, "load_average": {"1m": 3.38, "5m": 3.79, "15m": 3.84}},
"mem": {
"total_in_bytes": 62277025792,
"free_in_bytes": 4934840320,
"used_in_bytes": 57342185472,
"free_percent": 8,
"used_percent": 92,
},
"swap": {"total_in_bytes": 0, "free_in_bytes": 0, "used_in_bytes": 0},
"cgroup": {
"cpuacct": {"control_group": "/", "usage_nanos": 1394207523870751},
"cpu": {
"control_group": "/",
"cfs_period_micros": 100000,
"cfs_quota_micros": 793162,
"stat": {
"number_of_elapsed_periods": 41092415,
"number_of_times_throttled": 41890,
"time_throttled_nanos": 29380593023188,
},
},
"memory": {"control_group": "/", "limit_in_bytes": "62277025792", "usage_in_bytes": "57342185472"},
},
},
"process": {
"timestamp": 1526045135857,
"open_file_descriptors": 312,
Expand Down Expand Up @@ -2247,6 +2304,11 @@ def test_stores_all_nodes_stats(self, metrics_store_put_doc):
"jvm_gc_collectors_young_collection_time_in_millis": 309,
"jvm_gc_collectors_old_collection_count": 2,
"jvm_gc_collectors_old_collection_time_in_millis": 229,
"os_mem_total_in_bytes": 62277025792,
"os_mem_free_in_bytes": 4934840320,
"os_mem_used_in_bytes": 57342185472,
"os_mem_free_percent": 8,
"os_mem_used_percent": 92,
"transport_rx_count": 77,
"transport_rx_size_in_bytes": 98723498,
"transport_server_open": 12,
Expand Down Expand Up @@ -2413,6 +2475,32 @@ def test_stores_selected_indices_metrics_from_nodes_stats(self, metrics_store_pu
}
}
},
"os": {
"timestamp": 1655950949872,
"cpu": {"percent": 3, "load_average": {"1m": 3.38, "5m": 3.79, "15m": 3.84}},
"mem": {
"total_in_bytes": 62277025792,
"free_in_bytes": 4934840320,
"used_in_bytes": 57342185472,
"free_percent": 8,
"used_percent": 92,
},
"swap": {"total_in_bytes": 0, "free_in_bytes": 0, "used_in_bytes": 0},
"cgroup": {
"cpuacct": {"control_group": "/", "usage_nanos": 1394207523870751},
"cpu": {
"control_group": "/",
"cfs_period_micros": 100000,
"cfs_quota_micros": 793162,
"stat": {
"number_of_elapsed_periods": 41092415,
"number_of_times_throttled": 41890,
"time_throttled_nanos": 29380593023188,
},
},
"memory": {"control_group": "/", "limit_in_bytes": "62277025792", "usage_in_bytes": "57342185472"},
},
},
"process": {
"timestamp": 1526045135857,
"open_file_descriptors": 312,
Expand Down Expand Up @@ -2533,6 +2621,11 @@ def test_stores_selected_indices_metrics_from_nodes_stats(self, metrics_store_pu
"jvm_gc_collectors_young_collection_time_in_millis": 309,
"jvm_gc_collectors_old_collection_count": 2,
"jvm_gc_collectors_old_collection_time_in_millis": 229,
"os_mem_total_in_bytes": 62277025792,
"os_mem_free_in_bytes": 4934840320,
"os_mem_used_in_bytes": 57342185472,
"os_mem_free_percent": 8,
"os_mem_used_percent": 92,
"transport_rx_count": 77,
"transport_rx_size_in_bytes": 98723498,
"transport_server_open": 12,
Expand Down
Loading