Ensure new health endpoint builds on MacOS (#1215)

* Add mac build to CI

* Always return an error for Health when not linux

* Change macos workflow

* Rename macos tests

* Disable health API test on Mac

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
Paul Hauner
2020-06-01 21:18:31 +10:00
committed by GitHub
parent cb26ddebb1
commit 723c7cbd27
5 changed files with 27 additions and 2 deletions

View File

@@ -105,6 +105,8 @@ pub fn get_prometheus<T: BeaconChainTypes>(
store::scrape_for_metrics(&db_path, &freezer_db_path);
beacon_chain::scrape_for_metrics(&beacon_chain);
// This will silently fail if we are unable to observe the health. This is desired behaviour
// since we don't support `Health` for all platforms.
if let Ok(health) = Health::observe() {
set_gauge(&PROCESS_NUM_THREADS, health.pid_num_threads as i64);
set_gauge(&PROCESS_RES_MEM, health.pid_mem_resident_set_size as i64);