<commit_before>using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using BenchmarkDotNet.Attributes;
using Pidgin.Bench.SpracheParsers;
using Pidgin.Examples.Json;

namespace Pidgin.Bench
{
    [Config(typeof(Config))]
    public class JsonBench
    {
        private string _bigJson;
        private string _longJson;
        private string _wideJson;
        private string _deepJson;

        [Setup]
        public void Setup()
        {
            _bigJson = BuildJson(4, 4, 4).ToString();
            _longJson = BuildJson(1000, 1, 1).ToString();
            _wideJson = BuildJson(1, 1, 1000).ToString();
            _deepJson = BuildJson(1, 1000, 1).ToString();
        }

        [Benchmark]
        public void BigJson_Pidgin()
        {
            JsonParser.Parse(_bigJson);
        }
        [Benchmark]
        public void BigJson_Sprache()
        {
            SpracheJsonParser.Parse(_bigJson);
        }

        [Benchmark]
        public void LongJson_Pidgin()
        {
            JsonParser.Parse(_longJson);
        }
        [Benchmark]
        public void LongJson_Sprache()
        {
            SpracheJsonParser.Parse(_longJson);
        }

        [Benchmark]
        public void DeepJson_Pidgin()
        {
            JsonParser.Parse(_deepJson);
        }
        [Benchmark]<commit_msg>Trying to avoid blowing the stack in AppVeyor<commit_after>using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using BenchmarkDotNet.Attributes;
using Pidgin.Bench.SpracheParsers;
using Pidgin.Examples.Json;

namespace Pidgin.Bench
{
    [Config(typeof(Config))]
    public class JsonBench
    {
        private string _bigJson;
        private string _longJson;
        private string _wideJson;
        private string _deepJson;

        [Setup]
        public void Setup()
        {
            _bigJson = BuildJson(2, 4, 4).ToString();
            _longJson = BuildJson(500, 1, 1).ToString();
            _wideJson = BuildJson(1, 1, 500).ToString();
            _deepJson = BuildJson(1, 500, 1).ToString();
        }

        [Benchmark]
        public void BigJson_Pidgin()
        {
            JsonParser.Parse(_bigJson);
        }
        [Benchmark]
        public void BigJson_Sprache()
        {
            SpracheJsonParser.Parse(_bigJson);
        }

        [Benchmark]
        public void LongJson_Pidgin()
        {
            JsonParser.Parse(_longJson);
        }
        [Benchmark]
        public void LongJson_Sprache()
        {
            SpracheJsonParser.Parse(_longJson);
        }

        [Benchmark]
        public void DeepJson_Pidgin()
        {
            JsonParser.Parse(_deepJson);
        }
        [Benchmark]
{'fraction_non_alphanumeric': 0.09159754778218536, 'fraction_numerical': 0.014064190407500902, 'mean_word_length': 1.9138655462184875, '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': '1173155', 'n_tokens_mistral': 848, 'n_tokens_neox': 800, 'n_words': 162}