github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/apps/sys.monitor/site.main.src/src/elements/SysPerformance.js (about)

     1  /*
     2   * Copyright (c) 2022-present unTill Pro, Ltd.
     3   */
     4  
     5  import { Title } from 'react-admin';
     6  import { PaletteStatusCodes } from '../layout/Palette';
     7  import { Box } from '@mui/material';
     8  import { useTranslate } from 'react-admin';
     9  import TimeSeriesChart from '../charts/TimeSeriesChart';
    10  import { HttpStatusCodesMeta, ProcessorsPerformanceRpsMeta, StorageIopsCacheHitsMeta, StorageIopsMeta, SysApp } from '../data/Resources';
    11  import SysPerformanceWorstApps from './SysPerformanceWorstApps';
    12  import MonCard from './MonCard';
    13  
    14  const SysPerformance = (props) => {
    15  
    16      const translate = useTranslate();
    17  
    18      return (
    19          <Box>
    20              <Title title={props.title} />
    21              <TimeSeriesChart 
    22                  path={props.path+":rps"} 
    23                  caption={translate('charts.rps')} 
    24                  meta={ProcessorsPerformanceRpsMeta(SysApp)}
    25                  aggs={['avg']} 
    26                  units={'count'}
    27                  height={200}
    28                  showAll />
    29              <TimeSeriesChart 
    30                  path={props.path+":statusCodes"} 
    31                  caption={translate('charts.statusCodes')} 
    32                  meta={HttpStatusCodesMeta(SysApp)}
    33                  aggs={['sum']} 
    34                  units={'count'}
    35                  palette={PaletteStatusCodes}
    36                  height={200}
    37                  showAll
    38                  summaryChart />
    39              <MonCard caption={translate('charts.iops')}>
    40                  <TimeSeriesChart 
    41                      noframe
    42                      caption={translate('sysPerformance.executionTime')} 
    43                      path={props.path+":iops"}                 
    44                      meta={StorageIopsMeta(SysApp)}
    45                      aggs={['avg']} 
    46                      units={'count'}
    47                      height={200}
    48                      showAll />
    49                  <TimeSeriesChart 
    50                      noframe
    51                      caption={translate('sysPerformance.cacheHits')} 
    52                      path={props.path+":cacheHits"}                 
    53                      meta={StorageIopsCacheHitsMeta(SysApp)}
    54                      aggs={['avg']} 
    55                      units={'count'}
    56                      height={200}
    57                      showAll />
    58                  <SysPerformanceWorstApps />
    59              </MonCard>
    60          </Box>
    61      )
    62  };
    63  
    64  export default SysPerformance