SlideShare una empresa de Scribd logo
1 de 26
Babysitting Your ORM With A Custom TFS Build
Introduction
• My name: Adam Essenmacher
• Who are you?
– Developers?
– Technical Managers?
– Project Managers?
– Evangelists?
– BA’s?
Introduction
• ORM Experience
– Used in the past?
– Using currently?
– Which ORMs?
Introduction
• Are there any common issues or problems stemming
from your ORM implementations?
Anti-Objectives
• This presentation is not:
– … an endorsement of any specific ORM, or even ORMs in
general.
– … an endorsement of any specific tools, languages, or
frameworks.
– … a formula for a ‘silver bullet’.
Objectives
• “This presentation will discuss the importance of
integrating ORM performance analysis into your ALM
process and demonstrate a powerful method for doing
so by leveraging your existing CI/TFS environment.”
• This presentation is:
– … framed in the context of the .NET technology stack.
– … an application of simple ideas and established best-practices.
– … a suggestion that carries real, measurable ROI potential.
Overview
• Review
– ORMs
– CI/TFS

• Why measure an ORM’s behavior?
• Demo!
A Review: Object-Relational Mapper (ORM)

Database

ORM

Application
Code
A Review: Object-Relational Mapper (ORM)
A Review: Continuous Integration (CI)
Why Bother?
ORMs are a leaky abstraction!
Why Bother?: Some Numbers
4.8 Years
7.8 Months

• Send packet around the
world?
• Read 1 MB from HD?

11.6 Days

• Read 1 MB from SSD?

5.8 Days

• Make roundtrip in data
center?

1.6 Minutes
.5 Seconds

• Main Memory Ref
• L1 Cache Ref

https://gist.github.com/hellerbarde/2843375
Why Bother?: An N+1 Example
Why Bother?: An N+1 Example
Why Bother?: Other Detectable Issues
•
•
•
•
•
•
•
•
•
•
•

N+1
Too many joins
Variable SQL parameter sizes
Querying from a view
Ends with queries (like ‘%...’)
Excessive return rows
Excessive individual writes
Mixing queries and data binding
Excessive database calls
Unbounded result set
And more:
http://www.hibernatingrhinos.com/products/eprof/learn
Why Bother?
Why Bother?
Prerequisites
• Testing framework (MSTest)
• Continuous integration environment (TFS)
• Profiling software (Entity Framework Profiler)
– http://hibernatingrhinos.com

• Database integration test suite
• Demo project:
http://code.msdn.microsoft.com/ASPNET-MVC-Application-b01a9fe8
Demo
Demo
• Write exhaustive test suite:
Demo
• Commit! (gated check-in):
Demo
• Add test initializer:
Demo
• Add test tear-down:
Demo
• Attempt commit (gated check-in)
Demo
• Individual test results:
Questions?
• @a_Essenmacher
• aessenmacher@cardinalsolutions.com

Más contenido relacionado

La actualidad más candente

La actualidad más candente (10)

Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
Quack Chat | Fix Database Performance Problems with Profiling
Quack Chat | Fix Database Performance Problems with ProfilingQuack Chat | Fix Database Performance Problems with Profiling
Quack Chat | Fix Database Performance Problems with Profiling
 
[C3] 升級版eClass 4.1── 更流暢實用的網上教室
[C3] 升級版eClass 4.1── 更流暢實用的網上教室[C3] 升級版eClass 4.1── 更流暢實用的網上教室
[C3] 升級版eClass 4.1── 更流暢實用的網上教室
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
 
Hard Coding as a design approach
Hard Coding as a design approachHard Coding as a design approach
Hard Coding as a design approach
 
Improving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin WilliamsImproving Test Team Throughput via Architecture by Dustin Williams
Improving Test Team Throughput via Architecture by Dustin Williams
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
Andrew rusling 21 experiments to increase velocity
Andrew rusling 21 experiments to increase velocityAndrew rusling 21 experiments to increase velocity
Andrew rusling 21 experiments to increase velocity
 
Agile Testing Days
Agile Testing DaysAgile Testing Days
Agile Testing Days
 

Destacado

Презентация для Дилеров
Презентация для ДилеровПрезентация для Дилеров
Презентация для Дилеров
mrdoors
 
Blasco yus hardware
Blasco yus hardwareBlasco yus hardware
Blasco yus hardware
alvaroy98
 
Resume_Finance
Resume_FinanceResume_Finance
Resume_Finance
Mei Yee Ng
 

Destacado (15)

Trinos y Trinas
Trinos y TrinasTrinos y Trinas
Trinos y Trinas
 
Web 2.0
Web 2.0Web 2.0
Web 2.0
 
Evaluación Primer Parcial
Evaluación Primer ParcialEvaluación Primer Parcial
Evaluación Primer Parcial
 
Презентация для Дилеров
Презентация для ДилеровПрезентация для Дилеров
Презентация для Дилеров
 
Blasco yus hardware
Blasco yus hardwareBlasco yus hardware
Blasco yus hardware
 
Middleman Guides & How to Learn
Middleman Guides & How to LearnMiddleman Guides & How to Learn
Middleman Guides & How to Learn
 
Datasheet-Flexcom
Datasheet-FlexcomDatasheet-Flexcom
Datasheet-Flexcom
 
Ц.Цолмон "Хууль зүйн бодлого ба шүүхийн салбарын боловсон хүчний өөрчлөлт, үр...
Ц.Цолмон "Хууль зүйн бодлого ба шүүхийн салбарын боловсон хүчний өөрчлөлт, үр...Ц.Цолмон "Хууль зүйн бодлого ба шүүхийн салбарын боловсон хүчний өөрчлөлт, үр...
Ц.Цолмон "Хууль зүйн бодлого ба шүүхийн салбарын боловсон хүчний өөрчлөлт, үр...
 
Mega placement drive 2015 at NIMS University
Mega placement drive 2015 at NIMS UniversityMega placement drive 2015 at NIMS University
Mega placement drive 2015 at NIMS University
 
Posterdef
PosterdefPosterdef
Posterdef
 
Resume_Finance
Resume_FinanceResume_Finance
Resume_Finance
 
History of horror pp
History of horror ppHistory of horror pp
History of horror pp
 
Romanian Tourism Fair
Romanian Tourism FairRomanian Tourism Fair
Romanian Tourism Fair
 
Einfach Nachrüsten mit Zenecs Navi Z-E3715 für Fiat Ducato
Einfach Nachrüsten mit Zenecs Navi Z-E3715 für Fiat Ducato Einfach Nachrüsten mit Zenecs Navi Z-E3715 für Fiat Ducato
Einfach Nachrüsten mit Zenecs Navi Z-E3715 für Fiat Ducato
 
Nrc presentation ucmc_edit
Nrc presentation ucmc_editNrc presentation ucmc_edit
Nrc presentation ucmc_edit
 

Similar a Babysitting your orm essenmacher, adam

"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"
Naomi Dushay
 

Similar a Babysitting your orm essenmacher, adam (20)

50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
The Role of the Architect
The Role of the ArchitectThe Role of the Architect
The Role of the Architect
 
Deep Domain
Deep DomainDeep Domain
Deep Domain
 
Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019
 
Tuning ML Models: Scaling, Workflows, and Architecture
Tuning ML Models: Scaling, Workflows, and ArchitectureTuning ML Models: Scaling, Workflows, and Architecture
Tuning ML Models: Scaling, Workflows, and Architecture
 
Ten Advices for Architects
Ten Advices for ArchitectsTen Advices for Architects
Ten Advices for Architects
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to Work
 
"Hands Off! Best Practices for Code Hand Offs"
"Hands Off!  Best Practices for Code Hand Offs""Hands Off!  Best Practices for Code Hand Offs"
"Hands Off! Best Practices for Code Hand Offs"
 
10 Hinweise für Architekten
10 Hinweise für Architekten10 Hinweise für Architekten
10 Hinweise für Architekten
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
 
Time Traveling: Adapting Techniques from the Future to Improve Reliability, J...
Time Traveling: Adapting Techniques from the Future to Improve Reliability, J...Time Traveling: Adapting Techniques from the Future to Improve Reliability, J...
Time Traveling: Adapting Techniques from the Future to Improve Reliability, J...
 
Enterprise PHP
Enterprise PHPEnterprise PHP
Enterprise PHP
 
Useful automation
Useful automationUseful automation
Useful automation
 
Perl-Critic
Perl-CriticPerl-Critic
Perl-Critic
 
PAC 2019 virtual Alexander Podelko
PAC 2019 virtual Alexander Podelko PAC 2019 virtual Alexander Podelko
PAC 2019 virtual Alexander Podelko
 
Silicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in productionSilicon Valley Code Camp 2016 - MongoDB in production
Silicon Valley Code Camp 2016 - MongoDB in production
 
Software Engineering in Startups
Software Engineering in StartupsSoftware Engineering in Startups
Software Engineering in Startups
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 

Último

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Babysitting your orm essenmacher, adam

Notas del editor

  1. NHibernate, L2S,SubSonic, Entity Framework, Dapper (other Micro-ORMs?)
  2. Performance, unpredictable behavior, limited visibility into DAL, ‘weird’ queries
  3. -ROI: Memory pressure, application responsiveness (latency)
  4. Advantages of CI:Detect and resolve bugs and code quality issues continuouslyEarly discovery of code conflictsCurrent build is ‘always’ availableProvides central environment for long-running metrics build (which is huge for us!)Encourages frequent check-ins, which tends to result in more modular codeTRANSITION: Code ‘quality’ checked continuously!
  5. Monitor.Enter() is to force MSTest to run initialize/tear-down methods synchronously
  6. Monitor.Enter() is to force MSTest to run initialize/tear-down methods synchronously