alielie
2026-09-10 f3889f2d36c50cf99468594854def9b7ed069fb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System.Diagnostics;
using NUnit.Framework;
 
namespace DynamicExpresso.UnitTest
{
    [TestFixture]
    public class PerformanceTest
    {
        [Test]
        public void InterperterCreation()
        {
            // TODO Study if there is a better way to test performance
 
            var stopwatch = Stopwatch.StartNew();
 
            for (var i = 0; i < 1000; i++)
            {
                new Interpreter(InterpreterOptions.Default);
            }
 
            Assert.That(stopwatch.ElapsedMilliseconds, Is.LessThan(200));
        }
    }
}