<commit_before># Mappers performace testing

Project is used for testing the performance of selected mapper. 
The aim is to map the data to the data layer (database) on POCO / DTO objects.

Various methods are used to test the most frequent scenarios in simpler information system.

This project uses the library [Simple Injector](http://simpleinjector.readthedocs.org/en/latest/index.html) as simple IoC container for autodiscover.

Used mappers:

1. Vanila SqlDataReader
1. [Dapper](https://github.com/StackExchange/dapper-dot-net)
1. Entity Framework (v. 6.1.3)
1. Entity Framework, used as Unit of Work
1. Entity Framework with [Automapper](http://automapper.org/)
1. [Tiny Mapper](http://tinymapper.net/)
1. [Value Injector](https://www.nuget.org/packages/ValueInjecter/)

## Testing datbase
 1. MS SQL Server 2014 Express
 1. [ AdventureWorks Sample Database 2014](http://msftdbprodsamples.codeplex.com/)

# Results
<table border="1">
    <thead>
        <tr>
            <th>/</th>
            <th>Load large table</th>
            <th>Pagged result</th>
            <th>Load one row</th>
            <th>Load row with joined collection</th>
            <th>Combined</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Dapper</td>
            <td>174 ms</td>
            <td>54 ms</td>
            <td>3 ms</td>
            <td>12 ms</td>
            <td>30803 ms</td>
        </tr>
        <tr>
            <td>Date Reader</td>
            <td>161 ms</td>
            <td>40 ms</td>
            <td>1 ms</td>
            <td>1 ms</td>
            <td>30054 ms</td>
        </tr>
        <tr>
            <td>Date Reader - closing </td>
            <td>154 ms</td>
            <td>48 ms</td>
            <td>2 ms</td>
            <td>1 ms</td>
            <td>30672 ms</td>
        </tr>
        <tr>
            <td>Entity Framework</td>
            <td>648 ms</td>
            <td>88 ms</td>
            <td>24 ms</td>
            <td>57 ms</td>
            <td>39498 ms</td>
        </tr>
        <tr>
            <td>Entity Framework - AutoMapper </td>
            <td>166 ms</td>
            <td>45 ms</td>
            <td>16 ms</td>
            <td>31 ms</td>
            <td>35705 ms</td>
        </tr>
        <tr>
            <td>Entity Framework - UoF</td>
            <td>126 ms</td>
            <td>44 ms</td>
            <td>6 ms</td>
            <td>3 ms</td>
            <td>34842 ms</td>
        </tr>
        <tr>
            <td>Tiny Mapper</td>
            <td>2011 ms</td>
            <td>83 ms</td>
            <td>5 ms</td>
            <td>18 ms</td>
            <td>674694 ms</td>
        </tr>
        <tr>
            <td>Value Injector</td>
            <td>1995 ms</td>
            <td>80 ms</td>
            <td>6 ms</td>
            <td>4 ms</td>
            <td>636656 ms</td>
        </tr>
    </tbody>
</table>


For *Tiny Mapper* and *Value Injector*  results are not relevant, since in these cases need not take the valid mapping.

## Feature work

Added perfmace tests for .Net Core:
1. Vanila SqlDataReader
1. Dapper (.Net Core version)
1. Entity Framework Core
1. Entity Framework Core, used as Unit of Work
1. Entity Framework Core with [Automapper](http://automapper.org/)

## License<commit_msg>Xix features.<commit_after># Mappers performace testing

Project is used for testing the performance of selected mapper. 
The aim is to map the data to the data layer (database) on POCO / DTO objects.

Various methods are used to test the most frequent scenarios in simpler information system.

This project uses the library [Simple Injector](http://simpleinjector.readthedocs.org/en/latest/index.html) as simple IoC container for autodiscover.

Used mappers:

1. Vanila SqlDataReader
1. [Dapper](https://github.com/StackExchange/dapper-dot-net)
1. Entity Framework (v. 6.1.3)
1. Entity Framework, used as Unit of Work
1. Entity Framework with [Automapper](http://automapper.org/)
1. [Tiny Mapper](http://tinymapper.net/)
1. [Value Injector](https://www.nuget.org/packages/ValueInjecter/)

## Testing datbase
 1. MS SQL Server 2014 Express
 1. [ AdventureWorks Sample Database 2014](http://msftdbprodsamples.codeplex.com/)

# Results
<table border="1">
    <thead>
        <tr>
            <th>/</th>
            <th>Load large table</th>
            <th>Pagged result</th>
            <th>Load one row</th>
            <th>Load row with joined collection</th>
            <th>Combined</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Dapper</td>
            <td>174 ms</td>
            <td>54 ms</td>
            <td>3 ms</td>
            <td>12 ms</td>
            <td>30803 ms</td>
        </tr>
        <tr>
            <td>Date Reader</td>
            <td>161 ms</td>
            <td>40 ms</td>
            <td>1 ms</td>
            <td>1 ms</td>
            <td>30054 ms</td>
        </tr>
        <tr>
            <td>Date Reader - closing </td>
            <td>154 ms</td>
            <td>48 ms</td>
            <td>2 ms</td>
            <td>1 ms</td>
            <td>30672 ms</td>
        </tr>
        <tr>
            <td>Entity Framework</td>
            <td>648 ms</td>
            <td>88 ms</td>
            <td>24 ms</td>
            <td>57 ms</td>
            <td>39498 ms</td>
        </tr>
        <tr>
            <td>Entity Framework - AutoMapper </td>
            <td>166 ms</td>
            <td>45 ms</td>
            <td>16 ms</td>
            <td>31 ms</td>
            <td>35705 ms</td>
        </tr>
        <tr>
            <td>Entity Framework - UoF</td>
            <td>126 ms</td>
            <td>44 ms</td>
            <td>6 ms</td>
            <td>3 ms</td>
            <td>34842 ms</td>
        </tr>
        <tr>
            <td>Tiny Mapper</td>
            <td>2011 ms</td>
            <td>83 ms</td>
            <td>5 ms</td>
            <td>18 ms</td>
            <td>674694 ms</td>
        </tr>
        <tr>
            <td>Value Injector</td>
            <td>1995 ms</td>
            <td>80 ms</td>
            <td>6 ms</td>
            <td>4 ms</td>
            <td>636656 ms</td>
        </tr>
    </tbody>
</table>


For *Tiny Mapper* and *Value Injector*  results are not relevant, since in these cases need not take the valid mapping.

## Feature work

Added perfmace tests for .Net Core:


1. Vanila SqlDataReader
1. Dapper (.Net Core version)
1. Entity Framework Core
1. Entity Framework Core, used as Unit of Work
1. Entity Framework Core with [Automapper](http://automapper.org/)

## License
{'fraction_non_alphanumeric': 0.14174072939013177, 'fraction_numerical': 0.04045357033404842, 'mean_word_length': 1.5767864192656929, 'pattern_counts': {'":': 0, '<': 267, '<?xml version=': 0, '>': 267, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '37777', 'n_tokens_mistral': 2345, 'n_tokens_neox': 2155, 'n_words': 596}