<commit_before>/*
 * Copyright 2015 Cloudius Systems
 */

#include "api/api-doc/lsa.json.hh"
#include "api/lsa.hh"
#include "api/api.hh"

#include "http/exception.hh"
#include "utils/logalloc.hh"
#include "log.hh"

namespace api {

logging::logger logger("lsa-api");

void set_lsa(http_context& ctx, routes& r) {
    httpd::lsa_json::lsa_compact.set(r, [&ctx](std::unique_ptr<request> req) {
        logger.info("Triggering compaction");
        logalloc::shard_tracker().reclaim(std::numeric_limits<uint32_t>::max());
        return make_ready_future<json::json_return_type>(0);
    });
}

}<commit_msg>api: lsa: Make logger static<commit_after>/*
 * Copyright 2015 Cloudius Systems
 */

#include "api/api-doc/lsa.json.hh"
#include "api/lsa.hh"
#include "api/api.hh"

#include "http/exception.hh"
#include "utils/logalloc.hh"
#include "log.hh"

namespace api {

static logging::logger logger("lsa-api");

void set_lsa(http_context& ctx, routes& r) {
    httpd::lsa_json::lsa_compact.set(r, [&ctx](std::unique_ptr<request> req) {
        logger.info("Triggering compaction");
        logalloc::shard_tracker().reclaim(std::numeric_limits<uint32_t>::max());
        return make_ready_future<json::json_return_type>(0);
    });
}

}
{'fraction_non_alphanumeric': 0.17398373983739837, 'fraction_numerical': 0.011382113821138212, 'mean_word_length': 4.918269230769231, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '1583797', 'n_tokens_mistral': 465, 'n_tokens_neox': 451, 'n_words': 73}