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

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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Strings;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;

public class InProgressSnapshot {
    public static final Function<InProgressSnapshot, String> TO_TABBED_STRING = new InProgressFormatter();
    public static final Function<InProgressSnapshot, String> TO_FORMATTED_STRING = new InProgressFormatter() {
        @Override
        protected String formatColumnValue(String value) {
            return Strings.padStart(value, 20, ' ');
        }
    };
    private static final Logger LOG = LoggerFactory.getLogger(InProgressSnapshot.class);
    
    private final List<String> names = new ArrayList<String>();
    private final List<String> descriptions = new ArrayList<String>();
    private final List<Class<?>> classes = new ArrayList<Class<?>>();
    private final List<Map<String, Object>> values = Lists.newArrayList();

    private InProgressSnapshot(EventTimer timer, ThreadContext context) {
        names.add("Thread name");
        descriptions.add("Thread name");
        classes.add(String.class);

        names.add("Thread ID");
        descriptions.add("Thread ID");
        classes.add(Long.class);

        names.add("Event");
        descriptions.add("Event");
        classes.add(String.class);

        for (ThreadMetric metric : timer.getMetricSuite().metrics()) {
            names.add(metric.getMetricName());<commit_msg>squid:S1213 The members of an interface declaration or class should appear in a pre-defined order<commit_after>package com.custardsource.parfait.timing;

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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Strings;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;

public class InProgressSnapshot {
    private static final Logger LOG = LoggerFactory.getLogger(InProgressSnapshot.class);
    public static final Function<InProgressSnapshot, String> TO_TABBED_STRING = new InProgressFormatter();
    public static final Function<InProgressSnapshot, String> TO_FORMATTED_STRING = new InProgressFormatter() {
        @Override
        protected String formatColumnValue(String value) {
            return Strings.padStart(value, 20, ' ');
        }
    };
    
    private final List<String> names = new ArrayList<String>();
    private final List<String> descriptions = new ArrayList<String>();
    private final List<Class<?>> classes = new ArrayList<Class<?>>();
    private final List<Map<String, Object>> values = Lists.newArrayList();

    private InProgressSnapshot(EventTimer timer, ThreadContext context) {
        names.add("Thread name");
        descriptions.add("Thread name");
        classes.add(String.class);

        names.add("Thread ID");
        descriptions.add("Thread ID");
        classes.add(Long.class);

        names.add("Event");
        descriptions.add("Event");
        classes.add(String.class);

        for (ThreadMetric metric : timer.getMetricSuite().metrics()) {
            names.add(metric.getMetricName());
{'fraction_non_alphanumeric': 0.11254924029262803, 'fraction_numerical': 0.0033764772087788407, 'mean_word_length': 3.910220994475138, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '3232253', 'n_tokens_mistral': 967, 'n_tokens_neox': 955, 'n_words': 225}