<commit_before>package com.custardsource.parfait.timing;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class ThreadMetricSuite {
    private final List<ThreadMetric> metrics;
    
    private ThreadMetricSuite(Collection<? extends ThreadMetric> metrics) {
        this.metrics = new ArrayList<ThreadMetric>(metrics);
    }
    
    public final void addMetric(ThreadMetric metric) {
        metrics.add(metric);
    }

    public final void addAllMetrics(Collection<ThreadMetric> metrics) {
        this.metrics.addAll(metrics);
    }
    <commit_msg>Proper concurrent support in ThreadMetricSuite<commit_after>package com.custardsource.parfait.timing;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class ThreadMetricSuite {
    private final List<ThreadMetric> metrics;
    
    private ThreadMetricSuite(Collection<? extends ThreadMetric> metrics) {
        this.metrics = new CopyOnWriteArrayList<ThreadMetric>(metrics);
    }
    
    public final void addMetric(ThreadMetric metric) {
        metrics.add(metric);
    }

    public final void addAllMetrics(Collection<ThreadMetric> metrics) {
        this.metrics.addAll(metrics);
    }
    
{'fraction_non_alphanumeric': 0.08599695585996955, 'fraction_numerical': 0.0, 'mean_word_length': 3.981060606060606, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3406647', 'n_tokens_mistral': 357, 'n_tokens_neox': 353, 'n_words': 78}