LCOV - code coverage report
Current view: top level - disco/diag - fd_diag_tile.h (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 26 0.0 %
Date: 2026-09-17 04:28:31 Functions: 0 0 -

          Line data    Source code
       1             : #ifndef HEADER_fd_src_disco_diag_fd_diag_tile_h
       2             : #define HEADER_fd_src_disco_diag_fd_diag_tile_h
       3             : 
       4             : #include "../fd_disco_base.h"
       5             : 
       6           0 : #define FD_DIAG_BUNDLE_STATUS_DISABLED     (0UL) /* No bundle tiles configured */
       7           0 : #define FD_DIAG_BUNDLE_STATUS_DISCONNECTED (1UL) /* All bundle tiles disconnected */
       8           0 : #define FD_DIAG_BUNDLE_STATUS_CONNECTING   (2UL) /* At least one bundle tile connecting, none connected or sleeping */
       9           0 : #define FD_DIAG_BUNDLE_STATUS_CONNECTED    (3UL) /* At least one bundle tile connected */
      10           0 : #define FD_DIAG_BUNDLE_STATUS_SLEEPING     (4UL) /* At least one bundle tile sleeping, none connected */
      11             : 
      12           0 : #define FD_DIAG_VOTE_STATUS_DISABLED    (0UL) /* Non-voting or no tower tile */
      13           0 : #define FD_DIAG_VOTE_STATUS_NOT_STARTED (1UL) /* Tower tile not running or no votes cast yet */
      14           0 : #define FD_DIAG_VOTE_STATUS_DELINQUENT  (2UL) /* Vote distance exceeds threshold or vote stalled */
      15           0 : #define FD_DIAG_VOTE_STATUS_VOTING      (3UL) /* Voting normally */
      16             : 
      17           0 : #define FD_DIAG_REPLAY_STATUS_DISABLED    (0UL) /* No replay tile */
      18           0 : #define FD_DIAG_REPLAY_STATUS_NOT_STARTED (1UL) /* Replay tile not running or slots are zero */
      19           0 : #define FD_DIAG_REPLAY_STATUS_BEHIND      (2UL) /* Replay lagging behind turbine or reset slot stalled */
      20           0 : #define FD_DIAG_REPLAY_STATUS_RUNNING     (3UL) /* Replay keeping up */
      21             : 
      22           0 : #define FD_DIAG_TURBINE_STATUS_DISABLED         (0UL) /* No shred or replay tiles */
      23           0 : #define FD_DIAG_TURBINE_STATUS_NOT_STARTED      (1UL) /* Tiles not all running or turbine slot is zero */
      24           0 : #define FD_DIAG_TURBINE_STATUS_STALLED          (2UL) /* Turbine slot not advancing */
      25           0 : #define FD_DIAG_TURBINE_STATUS_REPAIR_OUTPACING (3UL) /* Repair byte throughput exceeds turbine */
      26           0 : #define FD_DIAG_TURBINE_STATUS_RUNNING          (4UL) /* Turbine receiving normally */
      27             : 
      28           0 : #define FD_DIAG_SYSTEM_CPU_MAX      (1024UL)
      29           0 : #define FD_DIAG_SYSTEM_NUMA_MAX     (64UL)
      30           0 : #define FD_DIAG_SYSTEM_TILE_MAX     (256UL)
      31             : #define FD_DIAG_SYSTEM_TILE_MEM_MAX (FD_DIAG_SYSTEM_TILE_MAX*FD_DIAG_SYSTEM_NUMA_MAX)
      32             : 
      33           0 : #define FD_DIAG_SYSTEM_FILE_CATEGORY_ACCOUNTS  (0U)
      34           0 : #define FD_DIAG_SYSTEM_FILE_CATEGORY_SHREDS    (1U)
      35           0 : #define FD_DIAG_SYSTEM_FILE_CATEGORY_SNAPSHOTS (2U)
      36           0 : #define FD_DIAG_SYSTEM_FILE_CATEGORY_GUI       (3U)
      37           0 : #define FD_DIAG_SYSTEM_FILE_CATEGORY_LOGS      (4U)
      38             : #define FD_DIAG_SYSTEM_FILE_MAX                 (5UL)
      39             : 
      40             : struct fd_diag_system_cpu {
      41             :   ushort cpu_idx;
      42             :   ushort numa_idx;
      43             :   ushort sibling_idx; /* USHORT_MAX when unavailable/offline */
      44             :   uchar  online;
      45             : };
      46             : typedef struct fd_diag_system_cpu fd_diag_system_cpu_t;
      47             : 
      48             : struct fd_diag_system_numa_mem {
      49             :   ushort numa_idx;
      50             :   ulong  total_bytes;
      51             :   ulong  free_bytes;
      52             :   ulong  shared_bytes; /* Configured workspace bytes without a unique tile owner */
      53             : };
      54             : typedef struct fd_diag_system_numa_mem fd_diag_system_numa_mem_t;
      55             : 
      56             : struct fd_diag_system_tile_mem {
      57             :   ushort tile_idx;
      58             :   ushort numa_idx;
      59             :   ulong  allocated_bytes; /* Configured workspace and stack bytes */
      60             : };
      61             : typedef struct fd_diag_system_tile_mem fd_diag_system_tile_mem_t;
      62             : 
      63             : struct fd_diag_system_mount {
      64             :   char  path[ PATH_MAX ];
      65             :   ulong total_bytes;
      66             :   ulong free_bytes;
      67             :   ulong available_bytes;
      68             : };
      69             : typedef struct fd_diag_system_mount fd_diag_system_mount_t;
      70             : 
      71             : struct fd_diag_system_file {
      72             :   char  path[ PATH_MAX ];
      73             :   uint  category;
      74             :   uint  mount_idx;
      75             :   ulong bytes;
      76             : };
      77             : typedef struct fd_diag_system_file fd_diag_system_file_t;
      78             : 
      79             : struct fd_diag_system_resources {
      80             :   ulong                     sample_time_nanos;
      81             :   uint                      cpu_cnt;
      82             :   ulong                     mem_available_bytes;
      83             :   ulong                     mem_free_bytes;
      84             :   uint                      numa_mem_cnt;
      85             :   uint                      tile_mem_cnt;
      86             :   uint                      mount_cnt;
      87             :   uint                      file_cnt;
      88             :   fd_diag_system_cpu_t      cpu     [ FD_DIAG_SYSTEM_CPU_MAX      ];
      89             :   fd_diag_system_numa_mem_t numa_mem[ FD_DIAG_SYSTEM_NUMA_MAX     ];
      90             :   fd_diag_system_tile_mem_t tile_mem[ FD_DIAG_SYSTEM_TILE_MEM_MAX ];
      91             :   fd_diag_system_mount_t    mount   [ FD_DIAG_SYSTEM_FILE_MAX     ];
      92             :   fd_diag_system_file_t     file    [ FD_DIAG_SYSTEM_FILE_MAX     ];
      93             : };
      94             : typedef struct fd_diag_system_resources fd_diag_system_resources_t;
      95             : 
      96             : #endif /* HEADER_fd_src_disco_diag_fd_diag_tile_h */

Generated by: LCOV version 1.14