private static function shine_spotlight( $loggers, $metrics ) {

		foreach ( $loggers as $k => $logger ) {
			$non_zero = false;
			foreach ( $metrics as $metric ) {
				switch ( $metric ) {
					// 100% cache ratio is fine by us
					case 'cache_ratio':
					case 'cache_hits':
					case 'cache_misses':
						if ( $logger->cache_ratio && '100%' !== $logger->cache_ratio ) {
							$non_zero = true;
						}
						break;
					case 'time':
					case 'query_time':
						if ( $logger->$metric > 0.01 ) {
							$non_zero = true;
						}
						break;
					default:
						if ( $logger->$metric ) {
							$non_zero = true;
						}
						break;
				}
			}
			if ( ! $non_zero ) {
				unset( $loggers[ $k ] );
			}
		}

		return $loggers;
	}
private static function shine_spotlight( $loggers, $metrics ) {

		foreach ( $loggers as $k => $logger ) {
			$non_zero = false;
			foreach ( $metrics as $metric ) {
				switch ( $metric ) {
					// 100% cache ratio is fine by us
					case 'cache_ratio':
					case 'cache_hits':
					case 'cache_misses':
						if ( $logger->cache_ratio && '100%' !== $logger->cache_ratio ) {
							$non_zero = true;
						}
						break;
					case 'time':
					case 'query_time':
						if ( $logger->$metric > 0.01 ) {
							$non_zero = true;
						}
						break;
					default:
						if ( $logger->$metric ) {
							$non_zero = true;
						}
						break;
				}
			}
			if ( ! $non_zero ) {
				unset( $loggers[ $k ] );
			}
		}

		return $loggers;
	}
private static function shine_spotlight ( $ loggers , $ metrics ) { foreach ( $ loggers as $ k => $ logger ) { $ non_zero = false ; foreach ( $ metrics as $ metric ) { switch ( $ metric ) { // 100% cache ratio is fine by us case 'cache_ratio' : case 'cache_hits' : case 'cache_misses' : if ( $ logger -> cache_ratio && '100%' !== $ logger -> cache_ratio ) { $ non_zero = true ; } break ; case 'time' : case 'query_time' : if ( $ logger -> $ metric > 0.01 ) { $ non_zero = true ; } break ; default : if ( $ logger -> $ metric ) { $ non_zero = true ; } break ; } } if ( ! $ non_zero ) { unset ( $ loggers [ $ k ] ) ; } } return $ loggers ; }
Filter loggers with zero-ish values.

@param array $loggers
@param array $metrics
@return array
Filter loggers with zero - ish values .