Posts Tagged ‘software performance’

Test Your .NET Profiler/Tracer Application

With our ThreadSuspendTester application (see C# source code and downlaod) you can get an idea of the abilities of your .NET testing tool.

Performance analysis with extremely multi threading - ThreadSuspendTest

ThreadSuspendTester is a small test program which records the overhead of .NET profilers or .NET tracers, especially at high concurrency.
The test program starts 100 threads, which in turn make allocations and garbage collections.

If you use SpeedTrace Pro as tracing/profiling tool, you will not detect much difference by the presence of the profiler. In contrast to other tools on the market, the overhead is very small.

Get an idea of your Profiler/Tracer. Compare the result with SpeedTrace Pro – You will be amazed.

Download ThreadSuspendTester.zip (Program.cs) Download ThreadSuspendTester.zip (Program.cs)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Collections;
using System.Diagnostics;
 
namespace ConsoleApplication1
{
    class Program
    {
        static bool terminated = false;
 
        static void Main(string[] args)
        {
            for (int i = 0; i < 15; i++)
            {
                Console.Write(string.Format("Test {0}...", i+1));
                ExecuteTest();
            }
 
            Console.WriteLine("DONE - Press ENTER to exit");
            Console.ReadLine();
        }
 
        private static void ExecuteTest()
        {
            var sw = new Stopwatch();
            sw.Start();
 
            System.Threading.Thread.CurrentThread.Priority = ThreadPriority.Normal;
            GC.Collect();
 
            for (int i = 0; i < 50; i++)
            {
                var threads = StartThreads();
 
                foreach (Thread t in threads)
                {
                    t.Abort();
                    GC.Collect();
                }
                terminated = true;
 
                foreach (Thread t in threads)
                {
                    t.Join();
                }
            }
 
            Console.WriteLine("Done..{0} ms", sw.ElapsedMilliseconds);
        }
 
        private static List<Thread> StartThreads()
        {
            var result = new List<Thread>();
            for (int i = 0; i < 1; i++)
            {
                var thread = new Thread(doNothingTest);
                thread.Priority = ThreadPriority.Lowest;
                thread.Start();
                result.Add(thread);
            }
 
            var thread2 = new Thread(allocTest);
            thread2.Priority = ThreadPriority.Lowest;
            thread2.Start();
            result.Add(thread2);
 
            for (int i = 0; i < 100; i++)
            {
                var thread = new Thread(allocTest);
                thread.Priority = ThreadPriority.Lowest;
                thread.Start();
                result.Add(thread);
            }
            return result;
        }
 
        static void allocTest()
        {
            int j=0;
            while (!terminated)
            {
                ArrayList list = new ArrayList();
                for (int i = 0; i < 1000; i++)
                {
                    list.Add(new Program());
                }
                list.Clear();
                if (j % 1 == 0)
                {
                    GC.Collect();
                }
 
                System.Threading.Thread.Sleep(1);
            }
        }
 
        static void doNothingTest()
        {
            while (!terminated)
            {
            }
        }   
    }
}

More about SpeedTrace >>
Download Now (free evaluation) >>

SpeedTrace your .NET Development now!

Performance, speed and stability – Issue No. 1

In all fields of software development, consumer demands and immense competition are mounting pressures to increase performance, speed and stability at an accelerating pace. Increasingly realistic computer graphics, real-time rendition and stable flow scenarios require highly sophisticated computer hardware and software. Every millisecond counts! Any runtime lost can lead to jerky presentation, lags, loss of data or hung sessions.

Software quality in a competitive world

The development lifecycles of software are being forcibly narrowed under the growing pressures of highly competitive markets. Increasingly more sophisticated follow-up versions have to be released with shorter lifecycles. Whoever is first to release any software product, is apt to win the race. However, here comes the dilemma: Shortening lifecycles under pressure tend to lead to error-prone software. Consequently, a growing number of service packs have to be issued to correct imperfect versions. This in fact shows that the time to develop has actually been pushed into the support phase. Users are liable to become involuntary beta testers having to install one update after another …

Costs of error under pressure

Unaided and badly equipped software testers and developers might have indistinct hunches or vague ideas why their software does not behave as expected under certain circumstances. But they usually have an insufficient notion why, let alone where or how, so much memory space, capacity and time gets wasted on simple tasks and why things are not working out properly according to plan. This is also why a lot of time gets lost on trouble-shooting, bug-trapping, and futile attempts to resolve performance issues and memory leaks.

Resolve the dilemma of quality under pressure

The SpeedTrace concept provides software developers and testers with just the answers they have been looking for: Conclusive issue resolution by getting to the root on the basis of objective measurements (no intrusion!)  – performed in no time and at very little cost.

The key to competitive edge is integrated quality assurance and sound lifecycle management with a high-end profiler-tracer like SpeedTrace Pro.

Why not get a free trial period of SpeedTrace Pro Version 3.4 with test automation enabling you to trace and profile your software products and developments over the cloud!

Download SpeedTrace Pro 3.4 and apply for a trial period now!