<commit_before>﻿namespace UnitTest.Rollbar.RollbarPerformance
{
    using global::Rollbar.Instrumentation;
    using global::Rollbar.Classification;
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;

    public class RollbarPerformanceMonitor
        : IPerformanceMonitor
    {
        private static readonly string performanceLogFileName = null;
        private static volatile RollbarPerformanceMonitor instance = null;
        private static object classSyncRoot = new object();
        private object _instanceSyncRoot = new object();

        private RollbarPerformanceMonitor()
        {
        }

        static RollbarPerformanceMonitor()
        {
            RollbarPerformanceMonitor.performanceLogFileName = @"RollbarPerformance-" + DateTimeOffset.Now.ToString().Replace(':','-') + ".csv";
            RollbarPerformanceMonitor.performanceLogFileName = Path.Combine(Environment.CurrentDirectory, performanceLogFileName);
        }

        public static IPerformanceMonitor Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (classSyncRoot)
                    {
                        if (instance == null)
                        {
                            instance = new RollbarPerformanceMonitor();
                        }
                    }
                }

                return instance;
            }
        }

        public void Capture(TimeSpan measuredTime, IClassification measurementClassification = null)
        {<commit_msg>- ref #259: Prototype Azure build pipeline for Rollbar.NET - ref #260: Fix unit test failure within Azure Pipeline<commit_after>﻿namespace UnitTest.Rollbar.RollbarPerformance
{
    using global::Rollbar.Instrumentation;
    using global::Rollbar.Classification;
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;

    public class RollbarPerformanceMonitor
        : IPerformanceMonitor
    {
        private static readonly string performanceLogFileName = null;
        private static volatile RollbarPerformanceMonitor instance = null;
        private static object classSyncRoot = new object();
        private object _instanceSyncRoot = new object();

        private RollbarPerformanceMonitor()
        {
        }

        static RollbarPerformanceMonitor()
        {
            RollbarPerformanceMonitor.performanceLogFileName = 
                @"RollbarPerformance-" 
                + DateTimeOffset.Now.ToString().Replace('\\','-').Replace(':','-').Replace(' ', '_') 
                + ".csv"
                ;
            RollbarPerformanceMonitor.performanceLogFileName = 
                Path.Combine(Environment.CurrentDirectory, performanceLogFileName)
                ;
        }

        public static IPerformanceMonitor Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (classSyncRoot)
                    {
                        if (instance == null)
                        {
                            instance = new RollbarPerformanceMonitor();
                        }
                    }
                }

                return instance;
            }
        }

        public void Capture(TimeSpan measuredTime, IClassification measurementClassification = null)
        {
{'fraction_non_alphanumeric': 0.0710334788937409, 'fraction_numerical': 0.0017467248908296944, 'mean_word_length': 1.686473807662236, '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': '2369249', 'n_tokens_mistral': 789, 'n_tokens_neox': 713, 'n_words': 171}