Coder Social home page Coder Social logo

mexx / simplespeedtester Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theburningmonk/simplespeedtester

0.0 2.0 0.0 28.74 MB

SimpleSpeedTester is a simple, easy to use framework that helps you speed test your .Net code by taking care of some of the orchestration for you.

Home Page: http://theburningmonk.com/tags/SimpleSpeedTester/

License: MIT License

F# 21.76% Batchfile 0.99% Shell 0.34% C# 76.91%

simplespeedtester's Introduction

Simple Speed Tester (@SimpleSpdTester)

Simple Speed Tester is a simple, easy to use framework that helps you speed test your .Net code by taking care of some of the orchestration for you.

It should NOT be confused with a performance profiler such as JetBrains' dotTrace or RedGate's ANTS profiler.

The Simple Speed Tester is intended for one thing and one thing only โ€“ help you speed test a specific piece of code/method over multiple runs, collate the results and work out the average for you so you only have to focus on producing the code you want to test.

Where it might be useful is when you want to compare the performance of two similar components/methods in terms of speed, for instance, the serialization and deserialization speed of DataContractJsonSerializer vs JavaScriptSerializer.

Getting Started

A detailed example program is included in the source code, but in the most basic case all you need is one line of code to execute a test (in the form of an Action delegate) a number of times and get back a summary including the number of successful (no exception) and failed (excepted) runs as well as the average time (in milliseconds) each test run took.

    // initialize a new test group
    var testGroup = new TestGroup("Example2");

    // PlanAndExecute actually executes the Action delegate 5 times and returns the result summary
    var testResultSummary = testGroup.PlanAndExecute("Test1", () => ExecuteTest(), 5);

    Console.WriteLine(testResultSummary);
    /* prints out something along the line of
     *
     * Test Group [Example2], Test [Test1] results summary:
     * Successes   [5]
     * Failures    [0] 
     * Average Exec Time [...] milliseconds
     *
     */

For more examples, check out the [Documentation] (https://github.com/theburningmonk/SimpleSpeedTester/wiki/Examples) page.

NuGet

Download and install Simple Speed Tester using NuGet.

NuGet package

simplespeedtester's People

Contributors

theburningmonk avatar davidgrenier avatar mausch avatar ysharplanguage avatar kevin-montrose avatar bitdeli-chef avatar jamesnk avatar

Watchers

Max Malook avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.