@ Override public ResponseEntity < MgmtSystemStatisticsRest > getSystemUsageStats ( ) { final SystemUsageReportWithTenants report = systemManagement . getSystemUsageStatisticsWithTenants ( ) ; final MgmtSystemStatisticsRest result = new MgmtSystemStatisticsRest ( ) . setOverallActions ( report . getOverallActions ( ) ) . setOverallArtifacts ( report . getOverallArtifacts ( ) ) . setOverallArtifactVolumeInBytes ( report . getOverallArtifactVolumeInBytes ( ) ) . setOverallTargets ( report . getOverallTargets ( ) ) . setOverallTenants ( report . getTenants ( ) . size ( ) ) ; result . setTenantStats ( report . getTenants ( ) . stream ( ) . map ( MgmtSystemManagementResource :: convertTenant ) . collect ( Collectors . toList ( ) ) ) ; return ResponseEntity . ok ( result ) ; }
Collects and returns system usage statistics . It provides a system wide overview and tenant based stats .