<commit_before>﻿using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Validators;
using System;
using System.Collections.Generic;
using System.Linq;

namespace BenchmarkDotNet.Toolchains.Results
{
    public class ExecuteResult
    {
        public bool FoundExecutable { get; }
        public int? ExitCode { get; }
        public int? ProcessId { get; }
        public IReadOnlyList<string> Errors => errors;
        public IReadOnlyList<Measurement> Measurements => measurements;
        public IReadOnlyList<string> ExtraOutput { get; }
        internal readonly GcStats GcStats;
        internal readonly ThreadingStats ThreadingStats;
        private readonly IReadOnlyList<string> data;
        private readonly List<string> errors;
        private readonly List<Measurement> measurements;

        // benchmark can fail after few Workload Actual iterations
        // that is why we search for Workload Results as they are produced at the end
        public bool IsSuccess => Measurements.Any(m => m.Is(IterationMode.Workload, IterationStage.Result));

        public ExecuteResult(bool foundExecutable, int? exitCode, int? processId, IReadOnlyList<string> data, IReadOnlyList<string> linesWithExtraOutput, int launchIndex)
        {
            FoundExecutable = foundExecutable;
            this.data = data;
            ProcessId = processId;
            ExitCode = exitCode;
            ExtraOutput = linesWithExtraOutput;<commit_msg>ExecuteResult: Surface a Data property so the full output can be accessed (#2096)<commit_after>﻿using BenchmarkDotNet.Engines;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;
using BenchmarkDotNet.Validators;
using System;
using System.Collections.Generic;
using System.Linq;

namespace BenchmarkDotNet.Toolchains.Results
{
    public class ExecuteResult
    {
        public bool FoundExecutable { get; }
        public int? ExitCode { get; }
        public int? ProcessId { get; }
        public IReadOnlyList<string> Errors => errors;
        public IReadOnlyList<string> Data => data;
        public IReadOnlyList<Measurement> Measurements => measurements;
        public IReadOnlyList<string> ExtraOutput { get; }
        internal readonly GcStats GcStats;
        internal readonly ThreadingStats ThreadingStats;
        private readonly IReadOnlyList<string> data;
        private readonly List<string> errors;
        private readonly List<Measurement> measurements;

        // benchmark can fail after few Workload Actual iterations
        // that is why we search for Workload Results as they are produced at the end
        public bool IsSuccess => Measurements.Any(m => m.Is(IterationMode.Workload, IterationStage.Result));

        public ExecuteResult(bool foundExecutable, int? exitCode, int? processId, IReadOnlyList<string> data, IReadOnlyList<string> linesWithExtraOutput, int launchIndex)
        {
            FoundExecutable = foundExecutable;
            this.data = data;
            ProcessId = processId;
            ExitCode = exitCode;
            ExtraOutput = linesWithExtraOutput;
{'fraction_non_alphanumeric': 0.06798595595276093, 'fraction_numerical': 0.0012767315671879987, 'mean_word_length': 3.2814207650273226, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 29, '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': '3951926', 'n_tokens_mistral': 817, 'n_tokens_neox': 793, 'n_words': 245}