<commit_before>package org.innovateuk.ifs.metrics;

import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConnectionCountService {

    private final PoolingHttpClientConnectionManager connManager;

    @Autowired
    public ConnectionCountService(PoolingHttpClientConnectionManager connManager) {
        this.connManager = connManager;
    }

    public boolean connectionHealthy() {
        return 0 < connManager.getTotalStats().getAvailable();
    }

}<commit_msg>fix broken readinessCheck<commit_after>package org.innovateuk.ifs.metrics;

import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConnectionCountService {

    private final PoolingHttpClientConnectionManager connManager;

    @Autowired
    public ConnectionCountService(PoolingHttpClientConnectionManager connManager) {
        this.connManager = connManager;
    }

    public boolean connectionHealthy() {
        return connManager.getMaxTotal() > getUsedConnections();
    }

    private int getUsedConnections(){
        return connManager.getTotalStats().getLeased();
    }

}
{'fraction_non_alphanumeric': 0.0770941438102298, 'fraction_numerical': 0.0007412898443291327, 'mean_word_length': 4.947136563876652, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1121703', 'n_tokens_mistral': 348, 'n_tokens_neox': 345, 'n_words': 63}