Git Product home page Git Product logo

odataef_queryperformance_sample's Introduction

Summary

This project is a barebones sample project to compare OData performance with bare AspNet core Web API performance (with an EF Model).

The model is very simple User,Role, an the linkink table UserRole. There is a SQL script SeedDatabaseAndTableData.sql to generate the database and seed the tables with some dummy data.

Jmeter

In the folder JmeterTests there are 2 verry basic tests . They search accpmplish the same thing , search user with contains by FirstName. They burst 400 requests and time the response until the final one completes.

The Jmeter Tests are:

 ODataSImpleContains.jmx
 REST_API_SimpleSearch.jmx

Odata test:

 `/odata/Users?$filter=contains(FirstName,'${__RandomString(2,first,)}')&$select=Id,FirstName`

REST_API test:

 `/api/Values/search?username=${__RandomString(2,first,)}`

${__RandomString(2,first,)} is a jmeter function to generate random strings. In this case it generates a 2 letter string from letters 'first' . See : https://stackoverflow.com/questions/30530652/jmeter-a-randomstring-function-that-is-used-for-creating-email-addresses

Base Results

The results are always at least 3x slower with odata query (eventhough it returns fiewer columns)

#Odata timings
summary =    400 in 00:00:04 =  101.8/s Avg:  1705 Min:   110 Max:  2853 Err:     0 (0.00%)
#Rest API timings
summary =    400 in 00:00:01 =  300.3/s Avg:   149 Min:     4 Max:   390 Err:     0

Note

The jmeter tests are verry rudimentary . They could probably be replaced with a batch CURL.

odataef_queryperformance_sample's People

Contributors

ovidiubuligan avatar

Watchers

James Cloos avatar  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.