<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>IntelliTrace Info : data collection control</title><link>http://blogs.msdn.com/ianhu/archive/tags/data+collection+control/default.aspx</link><description>Tags: data collection control</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>The Visual Studio Profiler Data Collection Control Part 1: Excluding Application Startup Time</title><link>http://blogs.msdn.com/ianhu/archive/2007/07/17/the-visual-studio-profiler-data-collection-control-part-1-excluding-application-startup-time.aspx</link><pubDate>Tue, 17 Jul 2007 20:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3920738</guid><dc:creator>ianhu</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/ianhu/comments/3920738.aspx</comments><wfw:commentRss>http://blogs.msdn.com/ianhu/commentrss.aspx?PostID=3920738</wfw:commentRss><description>&lt;DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 0in; PADDING-BOTTOM: 4pt; BORDER-LEFT: medium none; PADDING-TOP: 0in; BORDER-BOTTOM: #4f81bd 1pt solid; mso-element: para-border-div; mso-border-bottom-themecolor: accent1"&gt;
&lt;P class=MsoTitle style="MARGIN: 0in 0in 15pt"&gt;&lt;FONT face=Cambria color=#17365d size=7&gt;The Visual Studio Profiler Data Collection Control Part 1: Excluding Application Startup Time&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Even if you are familiar with &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/teamsystem/default.aspx"&gt;&lt;FONT face=Calibri size=3&gt;Visual Studio Team System&lt;/FONT&gt;&lt;/A&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;you may not already know that a powerful profiler is included with both the Developer and Team Suite editions of that product. If you are not familiar with the profiler you can check out some of my earlier &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/ianhu/archive/tags/Profiler/default.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;blog entries&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; or &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/teamsystem/aa718845.aspx#Development"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;TechNotes&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;. In my new series of blogs posts, starting with my first post about the &lt;/FONT&gt;&lt;A href="http://blogs.msdn.com/ianhu/archive/2007/04/03/comparing-performance-reports-with-the-visual-studio-team-system-profiler.aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;comparison documents&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;, I’m coving all the cool new features added to the profiler that customers will finally be able to see in the upcoming Orcas Beta releases. &lt;/FONT&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 24pt 0in 0pt"&gt;&lt;FONT face=Cambria color=#365f91 size=5&gt;The Data Collection Control&lt;/FONT&gt;&lt;/H1&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;In this article I’ll be focusing in on the data collection control. This control allows users several new ways to control and annotate your profiling files from the IDE while the profiler is running. Previously we have offered most of this control already, but only from the &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms182403(vs.80).aspx"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;VSPerfCmd&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; command line tool. The Data Collection Control lets you do things like pause and resume profiling, name marks and annotate the VSP file by adding marks to it. To show how to use the basic functions of the Data Collection Control I’ll walk through a few quick scenarios to demo these features. This TechNote assumes that you are familiar with the basics of using the profiler, if not check out the TechNotes &lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/teamsystem/aa718845.aspx#Development"&gt;&lt;FONT face=Calibri color=#0000ff size=3&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; for a good intro. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;H1 style="MARGIN: 24pt 0in 0pt"&gt;&lt;FONT face=Cambria color=#365f91 size=5&gt;Eliminate Startup Time from Analysis&lt;/FONT&gt;&lt;/H1&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;A highly common customer scenario that we are addressing with the data collection control is the customer who wants to collect steady-state data on their process and who does not care about how their time is being spent in startup. By controlling when you are collecting performance data the data collection control makes it a breeze to exclude startup information from being collected. For my example, I’m using the &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms182399(VS.80).aspx"&gt;&lt;FONT face=Calibri size=3&gt;PeopleTrax&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; sample application. When you first start up PeopleTrax the application take a while to initialize, then you can click the “Get People” button to populate a list of customer names. For the purpose of this demonstration I want to just collect data on the actual “Get People” operation and not collect any data during the application startup or shutdown.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;First off, make sure that you have a &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/teamsystem/aa718865.aspx"&gt;&lt;FONT face=Calibri size=3&gt;performance session&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt; set up in the Performance Explorer that is targeting your application. Now normally we would use the green launch button on the Performance Explorer to start our profiling session. But in our case this would not work, as we would begin by collecting data, and we don’t want to record any of our startup time. So instead of clicking launch, we’re going to click the dropdown control on the launch button and select “Launch with profiling paused.” This will launch the application with the profiler attached to the process, but will the actual collection of profiling data paused.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG title="Launch Paused" style="WIDTH: 320px; HEIGHT: 213px" height=213 alt="Launch Paused" src="http://farm2.static.flickr.com/1178/839378710_05eaaa9e09_o.jpg" width=320 mce_src="http://farm2.static.flickr.com/1178/839378710_05eaaa9e09_o.jpg"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Now after we have launched the PeopleTrax application will pop up, and back in the IDE we will see the new data collection control docked with the Performance Explorer (the data collection control should be on top of the Performance Explorer when you are currently profiling). &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;&lt;IMG title="Data Collection Control" style="WIDTH: 207px; HEIGHT: 252px" height=252 alt="Data Collection Control" src="http://farm2.static.flickr.com/1051/839378708_8fd8bd8f75_o.jpg" width=207 mce_src="http://farm2.static.flickr.com/1051/839378708_8fd8bd8f75_o.jpg"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Along the top toolbar of the data collection control you will see several icons, two of which are of particular interest to our current scenario; these being the pause profiling (second from the left) and resume profiling (third from the left) icons that control profiling state. Since we started out with profiling paused the profiler is not currently collecting data and thus the pause profiling button is grayed out. After the PeopleTrax application has initialized and popped up on-screen we have now passed the startup portion of the application and we want to collect data on the “GetPeople” operation.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;To do this, we will enable profiling data collection from the data control. Just click the “Resume Profiling” button. Now the pause profiling button will be active and the infobar on the data collection control will inform you that profiling is active. Right after activating profiling move over to the PeopleTrax application and click “Get People” to populate the customer list from the database. After the listview is populated click the pause profiling button to stop collecting data and then shutdown the PeopleTrax application to generate your report file. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Now the generated report will have only the data collected after you pressed the resume profiling button and before you pressed the pause profiling button, excluding startup and shutdown time. You also could exclude this time by &lt;/FONT&gt;&lt;/FONT&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.profiler(VS.80).aspx"&gt;&lt;FONT face=Calibri size=3&gt;annotating your code to start and stop profiling&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Calibri size=3&gt;, but the data collection controls makes this a quick and simple operation from the IDE, without having to muck about with command line tools. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;In my next blog entry I’ll look at how we can use the data collection control and filter queries to view only specific parts of performance reports after collecting a&amp;nbsp;large data file.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3920738" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/ianhu/archive/tags/Profiler/default.aspx">Profiler</category><category domain="http://blogs.msdn.com/ianhu/archive/tags/orcas/default.aspx">orcas</category><category domain="http://blogs.msdn.com/ianhu/archive/tags/data+collection+control/default.aspx">data collection control</category><category domain="http://blogs.msdn.com/ianhu/archive/tags/visual+studio+team+system/default.aspx">visual studio team system</category><category domain="http://blogs.msdn.com/ianhu/archive/tags/visual+studio/default.aspx">visual studio</category><category domain="http://blogs.msdn.com/ianhu/archive/tags/tsbt-dev/default.aspx">tsbt-dev</category></item></channel></rss>