<commit_before>var stats = {

    initRemoteHarvestMemory: function (source, target) {
        var memory = Memory.rooms[source];

        if (!memory.remoteHarvesting) {
            memory.remoteHarvesting = {};
        }
        if (!memory.remoteHarvesting[target]) {
            memory.remoteHarvesting[target] = {
                creepCost: 0,
                defenseCost: 0,
                buildCost: 0,
                revenue: 0,
                harvesters: [],
            };
        }

        // @toto Temporary.
        if (!memory.remoteHarvesting[target].defenseCost) {
            memory.remoteHarvesting[target].defenseCost = 0;
        }<commit_msg>added ability to clear harvest revenue stats<commit_after>var stats = {

    initRemoteHarvestMemory: function (source, target) {
        var memory = Memory.rooms[source];

        if (!memory.remoteHarvesting) {
            memory.remoteHarvesting = {};
        }
        if (!memory.remoteHarvesting[target]) {
            memory.remoteHarvesting[target] = {
                creepCost: 0,
                defenseCost: 0,
                buildCost: 0,
                revenue: 0,
                harvesters: [],
            };
        }

        // @todo Temporary.
        if (!memory.remoteHarvesting[target].defenseCost) {
            memory.remoteHarvesting[target].defenseCost = 0;
        }
    },

    clearRemoteHarvestStats: function (source, target) {
        if (!Memory.rooms[source]) return;

        var memory = Memory.rooms[source];
        stats.initRemoteHarvestMemory(source, target);

        memory.remoteHarvesting[target].creepCost = 0;
        memory.remoteHarvesting[target].defenseCost = 0;
        memory.remoteHarvesting[target].buildCost = 0;
        memory.remoteHarvesting[target].revenue = 0;
{'fraction_non_alphanumeric': 0.10708310094813163, 'fraction_numerical': 0.007808142777467931, 'mean_word_length': 1.856687898089172, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4238874', 'n_tokens_mistral': 515, 'n_tokens_neox': 479, 'n_words': 86}