identify & fix performance problems with visual studio 2012 ultimate benjamin day benjamin day...
TRANSCRIPT
![Page 1: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/1.jpg)
![Page 2: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/2.jpg)
Identify & Fix Performance Problems with Visual Studio 2012 UltimateBenjamin DayBenjamin Day Consulting, Inc.benday.com/blog | @benday
![Page 3: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/3.jpg)
About Me
Cambridge, MAConsultant, Coach, & TrainerMicrosoft MVP for Visual Studio ALMTeam Foundation Server, Software Testing, Scrum, Software ArchitectureScrum.org Classes
Professional Scrum Developer (PSD)Professional Scrum Foundations (PSF)
www.benday.com, [email protected], @benday
![Page 4: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/4.jpg)
Have you heard of Scrum.org?
![Page 5: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/5.jpg)
![Page 6: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/6.jpg)
http://www.pluralsight.com/training/Courses/TableOfContents/alm-fundamentals
![Page 7: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/7.jpg)
http://pluralsight.com/training/Courses/TableOfContents/alm-for-developers
![Page 8: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/8.jpg)
Thanks.
To my content reviewersJerri Chiu, MicrosoftDennis Bass, Microsoft
![Page 9: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/9.jpg)
The Agenda
Basics of Web Performance TestsLoad TestsLoad Test RigsPerformance Explorer
Existing application Identify performance problemsGo from bad performance to good
![Page 10: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/10.jpg)
![Page 11: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/11.jpg)
The Purpose of Load Testing
Identify the capabilities of your applicationPossible goals
ExploreVerify Find the limitsCrush
![Page 12: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/12.jpg)
The Obligatory “Eat Your Vegetables” Slide.
Load test throughout the development cycle.
Catch problems earlyEstablish performance baselineWatch for performance trends
Cheaper to fix early
Plan for performance
Best Practice
![Page 13: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/13.jpg)
Cheaper to Fix Early
Early Less Early Nearly Done Production0
10
20
30
40
50
60
Time
Cost
to fi
x
![Page 14: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/14.jpg)
Dose Of Reality
You know you should work that way.You probably don’t.
This talk is for you.
You have problems.How do you figure out what’s going wrong?
![Page 15: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/15.jpg)
Inspiration for this talk
Real customer engagementSpent years developing a web applicationReleased it Seriously grumpy customersHuge hardware~20 simultaneous usersFixed it
4000+ simultaneous usersReduced hardware
![Page 16: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/16.jpg)
The Tools
Visual Studio Ultimate
• Web Performance Tests• Load Tests• Load Test Rigs
Visual Studio Premium
• Profiling Tools• Performance Wizard
![Page 17: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/17.jpg)
Tour of the application.
![Page 18: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/18.jpg)
Disaster Strikes.
The application is deployed to production.Users are losing their minds.
Intermittent errors on the site.Site is slow.
Your boss is seriously angry.“Fix it!”
![Page 19: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/19.jpg)
The Problem.
“No Repro”“Works on my box.”You don’t know what the errors are.The site seems to work fine.
Wild guess: it dies under load.
You need to create some load.
![Page 20: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/20.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 21: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/21.jpg)
Web Performance Tests.
![Page 22: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/22.jpg)
The Plan.
1. Script user activity with Web Performance Tests
2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 23: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/23.jpg)
What is a Web Performance Test?
Test type in Visual Studio 2012 UltimateSimulate a user using an ASP.NET application
HTTP trafficBuilding block of Load Tests
![Page 24: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/24.jpg)
Tip: Web Tests & User Stories
Web Tests should simulate a User StoryExample:
As an administrator, I need to search for a person by username so that I can deactivate that person’s account.As a customer, I want to order a pizza and pay with a credit card.
Helps to organize your suite
![Page 25: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/25.jpg)
Create a basic Web Test
![Page 26: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/26.jpg)
Data-driven Web Tests
Run web test once per row in data sourceSimulate multiple users doing *similar* actionsData source types
OLE DB, CSV, XMLParameterization
Better tests, better coverage
![Page 27: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/27.jpg)
Web Tests in the underperforming app
![Page 28: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/28.jpg)
Load Tests.
![Page 29: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/29.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 30: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/30.jpg)
What are Load Tests?
Mix of Web Performance and Unit Tests
Simulates a mix of users doing a mix of things
Simulate Network speedsDifferent browsersVarying user activity loads
![Page 31: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/31.jpg)
Why would you put a Unit Test in a Load Test?
Helpful for testing WCFCumbersome to simulate WCF via Web Test
(You’d have to re-invent the wheel.)Unit tests can re-use the WCF libraries
(Done and done.)
Important for Silverlight and SOAhttp://wcfloadtest.codeplex.com/http://sqlloadtest.codeplex.com/
![Page 32: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/32.jpg)
(Hooray!)
“Hey Kids,Let’s create some Load Tests!”
![Page 33: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/33.jpg)
Running load tests.
![Page 34: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/34.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 35: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/35.jpg)
Two ways to run load tests.
Generate load from Visual Studio 2012Uses only 1 core/processorLimited to 250 simulated users
Generate load from a Test RigFar better testSimulate lots more users
![Page 36: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/36.jpg)
Load Test Rig & The Application
ControllerOrchestratesLicensingPerfMon Counters
Agent (1..n)Simulates users
Controller
Agent 1
Web Server
Database
Agent 2
Agent n
Coordinates & Gathers Information
Generates Load
Application Under Test
![Page 37: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/37.jpg)
Load Test Rig: Manage Test Controller
![Page 38: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/38.jpg)
Load Test Rig: Test Settings
![Page 39: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/39.jpg)
Load Test Rig: Remote Execution
![Page 40: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/40.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 41: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/41.jpg)
Run Load Tests on the Rig
![Page 42: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/42.jpg)
Before: Load Test Summary
![Page 43: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/43.jpg)
Before: Load Test Graphs
![Page 44: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/44.jpg)
The Core Problem.
![Page 45: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/45.jpg)
‘sp_who2’ says lots of open connections.
![Page 46: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/46.jpg)
After: Load Test Summary
![Page 47: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/47.jpg)
After: Load Test Graphs
![Page 48: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/48.jpg)
Performance Profiling
![Page 49: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/49.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance
Wizard6. Fix the code
![Page 50: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/50.jpg)
Profiling Tools
Load Tests help you find issues in a system“Surface” issues
Profiling helps you find issues in the code
Unit Tests, Web Tests, Load TestsRepeatableGood for targeted tuning
System under “natural” loadNot repeatableLooking for rough patterns
![Page 51: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/51.jpg)
Profiling Methods•Gathers information at intervals (clock cycles)•No code modifications•Use this for first pass explorationsSampling•Modifies your code•Gathers detailed timing and count information
Instrumentation
•Multi-threaded code profilingConcurrency
•Object creation•Garbage collection.NET Memory
•Interaction between your application and SQL Server via ADO.NET
Tier Interaction
![Page 52: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/52.jpg)
Load Test Performance Sessions Via Wizard
Must be only Web Performance TestsCan’t profile via Load Test Rig
![Page 53: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/53.jpg)
Let’s go profile some stuff.
![Page 54: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/54.jpg)
The Plan.
1. Script user activity with Web Performance Tests2. Simulate a mix of users using Load Tests3. Simulate lots of users with a Load Test Rig4. Reproduce the errors...hopefully5. Find code problems with the Performance Wizard6. Fix the code
![Page 55: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/55.jpg)
Any last questions?
![Page 56: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/56.jpg)
For More Information: Articles
Uses Visual Studio 2012
http://tinyurl.com/8sdjjak
![Page 57: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/57.jpg)
For More Information: Articles
Uses Visual Studio 2010
http://tinyurl.com/3xjqgvz
http://tinyurl.com/2ulvvvr
![Page 58: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/58.jpg)
For More Information: Microsoft Links
Visual Studio Performance Testing Quick Reference Guidehttp://vsptqrg.codeplex.com/ Content Index for Web Tests & Load Testshttp://tinyurl.com/ye97e52
![Page 59: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/59.jpg)
For More Information: Microsoft Bloggers
VS Team Test Blog Site http://blogs.msdn.com/b/vstsqualitytools/Ed Glas - http://blogs.msdn.com/edglas/Bill Barnett - http://blogs.msdn.com/billbar/Sean Lumley - http://blogs.msdn.com/slumley/Dennis Stone - http://blogs.msdn.com/densto/Mike Taute - http://blogs.msdn.com/mtaute/Neelesh Kamkolkar - http://blogs.msdn.com/b/nkamkolkar/
![Page 61: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/61.jpg)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.
![Page 62: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/62.jpg)
Miscellaneous tips.
![Page 63: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/63.jpg)
Include Load Tests In Your Nightly Build
Create a Test List (*.vsmdi)Include the Test List in the buildCaptures trend data at 24 hours intervalsCompare the load test data with Excel
![Page 64: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/64.jpg)
Static Code Analysis / FxCop
Help you to find issues in your codeShow you IDispose errors
Rules are configurableUse your judgment about which are relevant for your team
![Page 65: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/65.jpg)
Avoid Static Methods & CA1822
Static Code Analysis Rule CA1822 is evil.
Sacrifices maintainability for perfomance.
Blog post: “Static Methods Are A Code Smell”http://bit.ly/cnEsuV
![Page 66: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/66.jpg)
Only optimize known performance problems.
You’d be surprised by what *ISN’T* a performance problemDon’t spend a ton of time coding fancy solutions to performance problems you *THINK* you might haveFind and fix *REAL* problems
![Page 67: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/67.jpg)
Tip: WCF Message Size
Data structure formatting can make a huge differenceExample: Banks and the States they operate inOption 1: Dictionary<string, string>
Key = Bank IdValue = State Abbreviation
Option 2: Dictionary<string, string[]>Key = State AbbreviationValue = Array of Bank Id’s
Option 2 was approximately 90% smaller
![Page 68: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/68.jpg)
Tip: Add Performance Counters
Create Performance Counters (perfmon) in your appDo this early in the development cycle
More directed profiling of your app during Load Tests
Good for managing your app when it’s in production(Operations people love this.)
![Page 69: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/69.jpg)
Using Performance Sessions on x64
You can’t profile x64 IIS processes from the IDE
Option #1: Profile from the command lineStart ASP.NET profiling using VSPerfAspNetCmd.exe Run the web test
Option #2: Run the ASP.NET process in x86 mode
![Page 70: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/70.jpg)
How To Run ASP.NET in x86 Mode
Set “Enable 32-bit Applications” to true on your application’s AppPool
![Page 71: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/71.jpg)
Resources
Connect. Share. Discuss.
http://northamerica.msteched.com
Learning
Microsoft Certification & Training Resources
www.microsoft.com/learning
TechNet
Resources for IT Professionals
http://microsoft.com/technet
Resources for Developers
http://microsoft.com/msdn
![Page 72: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/72.jpg)
Complete an evaluation on CommNet and enter to win!
![Page 73: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/73.jpg)
MS Tag
Scan the Tagto evaluate thissession now onmyTechEd Mobile
Required Slide *delete this box when your slide is finalized
Your MS Tag will be inserted here during the final scrub.
![Page 74: Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog | @benday](https://reader037.vdocuments.site/reader037/viewer/2022110400/56649daa5503460f94a97e1b/html5/thumbnails/74.jpg)
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to
be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS
PRESENTATION.