TranslatorSRI / NodeNormalization

Service that produces Translator compliant nodes given a curie
MIT License
10 stars 6 forks source link

Add a status endpoint with database name, key count and memory usage for each database #268

Closed gaurav closed 2 months ago

gaurav commented 5 months ago

This PR adds a /status endpoint that returns a bunch of information about the databases this NodeNorm instance is connected to. Here is what it currently returns for 2024aug18:

{
  "status": "running",
  "databases": {
    "eq_id_to_id_db": {
      "dbname": "id-id",
      "count": 662155521,
      "used_memory_rss_human": "67.50G",
      "is_cluster": false
    },
    "id_to_eqids_db": {
      "dbname": "id-eq-id",
      "count": 475350787,
      "used_memory_rss_human": "106.66G",
      "is_cluster": false
    },
    "id_to_type_db": {
      "dbname": "id-categories",
      "count": 475350787,
      "used_memory_rss_human": "44.76G",
      "is_cluster": false
    },
    "curie_to_bl_type_db": {
      "dbname": "semantic-count",
      "count": 134,
      "used_memory_rss_human": "13.87M",
      "is_cluster": false
    },
    "info_content_db": {
      "dbname": "info-content",
      "count": 3346582,
      "used_memory_rss_human": "212.19M",
      "is_cluster": false
    },
    "gene_protein_db": {
      "dbname": "conflation-db",
      "count": 21431316,
      "used_memory_rss_human": "3.93G",
      "is_cluster": false
    },
    "chemical_drug_db": {
      "dbname": "chemical-drug-db",
      "count": 102852,
      "used_memory_rss_human": "159.74M",
      "is_cluster": false
    }
  }
}