<?xml version="1.0"?>
<Rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/vs/profiler/guidance_rules/1.0">
  <Rule>
    <ID>1</ID>
    <Title>Use StringBuilder for concatenations.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Consider using StringBuilder for string concatenations.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>Or</CondType>
      <Condition1 xsi:type="FunctionThresholdPercentCondition">
        <Threshold>5</Threshold>
        <ModuleName>mscorlib.ni.dll</ModuleName>
        <FunctionName>System.String.Concat(.*)</FunctionName>
        <ColumnName>InclSamplesPercent</ColumnName>
        <ComplexRegex>false</ComplexRegex>
      </Condition1>
      <Condition2 xsi:type="FunctionThresholdPercentCondition">
        <Threshold>5</Threshold>
        <ModuleName>mscorlib.dll</ModuleName>
        <FunctionName>System.String.Concat(.*)</FunctionName>
        <ColumnName>InclusiveApplicationTimePercent</ColumnName>
        <ComplexRegex>false</ComplexRegex>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0001</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>2</ID>
    <Title>VSPerfCorProf.dll missing.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>It appears that the file was collected without properly setting the environment variables with VSPerfCLREnv.cmd. Symbols for managed binaries may not resolve.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>IsVsPerfCorProfMissing</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0002</HelpKeyword>
    <Action>Error</Action>
  </Rule>
  <Rule>
    <ID>3</ID>
    <Title>Many samples in Kernel mode.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>You have a high proportion of samples in Kernel Mode. This might indicate a high volume of I/O activity or a high rate of context switching. Consider profiling your application again using Instrumentation Mode.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsSampling</PropertyName>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>And</CondType>
        <Condition1 xsi:type="VspPropertyRatioCondition">
          <PropertyName>NumKernelSamples</PropertyName>
          <TotalPropertyName>TotalSamples</TotalPropertyName>
          <Threshold>75</Threshold>
        </Condition1>
        <Condition2 xsi:type="VspPropertyThresholdCondition">
          <PropertyName>TotalSamples</PropertyName>
          <Threshold>750</Threshold>
          <ThresholdTest>GreaterThan</ThresholdTest>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0003</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>4</ID>
    <Title>CPU Busy consistently > 75%.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Your processor usage is consistently above 75%. Consider using Sampling mode for CPU-bound applications.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsInstrumentation</PropertyName>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\Processor(_Total)\% Processor Time</WinCounterName>
        <Threshold>75</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>false</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0004</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>5</ID>
    <Title>Frequent GC2 Collections.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Many of your objects are being collected in generation 2 garbage collection.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>ManyGC2Collections</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0005</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>6</ID>
    <Title>Override Equals() for value types.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Override Equals and equality operator on value types.</GuidanceMessage>
    <Condition xsi:type="FunctionThresholdPercentCondition">
      <Threshold>3</Threshold>
      <ModuleName>mscorlib.ni.dll</ModuleName>
      <FunctionName>System.ValueType.Equals(object)</FunctionName>
      <ColumnName>InclSamplesPercent</ColumnName>
      <ComplexRegex>false</ComplexRegex>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0006</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>7</ID>
    <Title>Avoid using exceptions for routine control flow.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>A high number of exceptions are consistently being thrown. Consider reducing the use of exceptions in program logic.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\.NET CLR Exceptions(@Instance)\# of Exceps Thrown / sec</WinCounterName>
      <Threshold>10</Threshold>
      <AggregationType>Average</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>25</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0007</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>8</ID>
    <Title>Few samples collected.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Only a small number of samples were collected. Consider a longer run or faster sampling rate for more significant results.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsSampling</PropertyName>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>And</CondType>
        <Condition1 xsi:type="VspPropertyBoolCondition">
          <PropertyName>IsAllocation</PropertyName>
          <Invert>true</Invert>
        </Condition1>
        <Condition2 xsi:type="VspPropertyThresholdCondition">
          <PropertyName>TotalSamples</PropertyName>
          <Threshold>300</Threshold>
          <ThresholdTest>LessThan</ThresholdTest>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0008</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>10</ID>
    <Title>Expensive GetHashCode Function.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>GetHashCode functions should be cheap and not allocate any memory. Reduce complexity of hash code function if possible.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>Or</CondType>
      <Condition1 xsi:type="FunctionThresholdPercentCondition">
        <Threshold>5</Threshold>
        <ModuleName>.*</ModuleName>
        <FunctionName>.*.GetHashCode()</FunctionName>
        <ColumnName>InclSamplesPercent</ColumnName>
        <ComplexRegex>false</ComplexRegex>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>.*</ModuleName>
          <FunctionName>.*.GetHashCode()</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>0</Threshold>
          <ModuleName>.*</ModuleName>
          <FunctionName>(?!System).*\.GetHashCode\(\)</FunctionName>
          <ColumnName>InclAllocsPercent</ColumnName>
          <ComplexRegex>true</ComplexRegex>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0010</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>11</ID>
    <Title>Expensive CompareTo Function.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>CompareTo functions should be cheap and not allocate any memory. Reduce complexity of CompareTo function if possible.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>Or</CondType>
      <Condition1 xsi:type="FunctionThresholdPercentCondition">
        <Threshold>5</Threshold>
        <ModuleName>.*</ModuleName>
        <FunctionName>.*CompareTo(object)</FunctionName>
        <ColumnName>InclSamplesPercent</ColumnName>
        <ComplexRegex>false</ComplexRegex>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>.*</ModuleName>
          <FunctionName>.*CompareTo(object)</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>0</Threshold>
          <ModuleName>.*</ModuleName>
          <FunctionName>.*CompareTo(object)</FunctionName>
          <ColumnName>InclAllocsPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0011</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>12</ID>
    <Title>Be careful not to overuse reflection.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>You may be using Reflection excessively. It is an expensive operation.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>Or</CondType>
      <Condition1 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>mscorlib.ni.dll</ModuleName>
          <FunctionName>System.Type.InvokeMember(.*)</FunctionName>
          <ColumnName>InclSamplesPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>mscorlib.ni.dll</ModuleName>
          <FunctionName>System.Reflection.*.Get.*(.*)</FunctionName>
          <ColumnName>InclSamplesPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>mscorlib.dll</ModuleName>
          <FunctionName>System.Type.InvokeMember(.*)</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>5</Threshold>
          <ModuleName>mscorlib.dll</ModuleName>
          <FunctionName>System.Reflection.*.Get.*(.*)</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0012</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>13</ID>
    <Title>High usage of String.Split/String.Substring.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Consider reducing use of String.Split and String.Substring functions.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>Or</CondType>
      <Condition1 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>3</Threshold>
          <ModuleName>mscorlib.ni.dll</ModuleName>
          <FunctionName>System.String.Substring(.*)</FunctionName>
          <ColumnName>InclSamplesPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>3</Threshold>
          <ModuleName>mscorlib.ni.dll</ModuleName>
          <FunctionName>System.String.Split(.*)</FunctionName>
          <ColumnName>InclSamplesPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>3</Threshold>
          <ModuleName>mscorlib.dll</ModuleName>
          <FunctionName>System.String.Substring(.*)</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>3</Threshold>
          <ModuleName>mscorlib.dll</ModuleName>
          <FunctionName>System.String.Split(.*)</FunctionName>
          <ColumnName>InclusiveApplicationTimePercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0013</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>14</ID>
    <Title>Extremely high rates of paging active memory to disk.</Title>
    <Category>MemoryAndPaging</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>An extremely high rate of paging active memory to disk is occurring. Your application may be memory-bound.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
        <WinCounterName>\Memory\Pages/sec</WinCounterName>
        <Threshold>500</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>false</IsProcessSpecific>
        <MinimumNumberOfValues>25</MinimumNumberOfValues>
      </Condition>
    <SupersedesRule>17</SupersedesRule>
    <HelpKeyword>vs.performance.rules.DA0014</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>17</ID>
    <Title>High rates of paging active memory to disk.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>A high rate of paging active memory to disk is occurring. Your application may be memory-bound.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Memory\Pages/sec</WinCounterName>
      <Threshold>300</Threshold>
      <AggregationType>Average</AggregationType>
      <IsProcessSpecific>false</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0017</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>18</ID>
    <Title>32-bit Application running at process managed memory limits.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Managed memory allocations approaching the default limit for a 32-bit process. Your application may be memory-bound.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>Is64Bit</PropertyName>
        <Invert>true</Invert>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="WinCounterCondition">
          <WinCounterName>\.NET CLR Memory(@Instance)\# Bytes in all Heaps</WinCounterName>
          <Threshold>750000000</Threshold>
          <AggregationType>Maximum</AggregationType>
          <IsProcessSpecific>true</IsProcessSpecific>
          <MinimumNumberOfValues>10</MinimumNumberOfValues>
        </Condition1>
        <Condition2 xsi:type="WinCounterCondition">
          <WinCounterName>\.NET CLR Memory(@Instance)\# Total committed bytes</WinCounterName>
          <Threshold>750000000</Threshold>
          <AggregationType>Maximum</AggregationType>
          <IsProcessSpecific>true</IsProcessSpecific>
          <MinimumNumberOfValues>10</MinimumNumberOfValues>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0018</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>21</ID>
    <Title>High rate of Gen 1 garbage collections.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Relatively high rate of Gen 1 garbage collections is occurring. If, by design, most of your program's data structures are allocated and persisted for a long time, this is not ordinarily a problem. However, if this behavior is unintended, your app may be pinning objects. If you are not certain, you can gather .NET memory allocation data and object lifetime information to understand the pattern of memory allocation your application uses.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 0 Collections</WinCounterName>
        <Threshold>30</Threshold>
        <AggregationType>Maximum</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="WinCounterRatioCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 0 Collections</WinCounterName>
        <TotalWinCounterName>\.NET CLR Memory(@Instance)\# Gen 1 Collections</TotalWinCounterName>
        <Threshold>5</Threshold>
        <ThresholdTest>LessThan</ThresholdTest>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0021</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>22</ID>
    <Title>High rate of Gen 2 garbage collections.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>There is a relatively high rate of Gen 2 garbage collections occurring. If, by design, most of your program's data structures are allocated and persisted for a long time, this is not ordinarily a problem. However, if this behavior is unintended, your app may be pinning objects. If you are not certain, you can gather .NET memory allocation data and object lifetime information to understand the pattern of memory allocation your application uses.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 0 Collections</WinCounterName>
        <Threshold>50</Threshold>
        <AggregationType>Maximum</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="WinCounterRatioCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 1 Collections</WinCounterName>
        <TotalWinCounterName>\.NET CLR Memory(@Instance)\# Gen 2 Collections</TotalWinCounterName>
        <Threshold>5</Threshold>
        <ThresholdTest>LessThan</ThresholdTest>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <SupersedesRule>21</SupersedesRule>
    <HelpKeyword>vs.performance.rules.DA0022</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>23</ID>
    <Title>High GC CPU Time.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>
      % Time in GC is relatively high. This indication of excessive amount of garbage collection overhead could be impacting the responsiveness of your application. You can gather .NET memory allocation data and object lifetime information to understand the pattern of memory allocation your application uses better.
    </GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 0 Collections</WinCounterName>
        <Threshold>30</Threshold>
        <AggregationType>Maximum</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\% Time in GC</WinCounterName>
        <Threshold>10</Threshold>
        <ThresholdTest>GreaterThan</ThresholdTest>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0023</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>24</ID>
    <Title>Excessive GC CPU Time.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>% Time in GC is very high. There is an excessive amount of garbage collection overhead.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\# Gen 0 Collections</WinCounterName>
        <Threshold>30</Threshold>
        <AggregationType>Maximum</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR Memory(@Instance)\% Time in GC</WinCounterName>
        <Threshold>40</Threshold>
        <ThresholdTest>GreaterThan</ThresholdTest>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <SupersedesRule >23</SupersedesRule>
    <HelpKeyword>vs.performance.rules.DA0024</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>25</ID>
    <Title>High degree of kernel CPU time processing.</Title>
    <Category>ProcessorUsage</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Relatively high amount of kernel mode CPU time was measured. You should investigate the source with SysCall sampling enabled.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\Processor(_Total)\% Processor Time</WinCounterName>
        <Threshold>30</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>false</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="WinCounterRatioCondition">
        <WinCounterName>\Processor(_Total)\% Privileged Time</WinCounterName>
        <TotalWinCounterName>\Processor(_Total)\% User Time</TotalWinCounterName>
        <Threshold>1</Threshold>
        <ThresholdTest>GreaterThan</ThresholdTest>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>false</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0025</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>26</ID>
    <Title>Excessive kernel CPU time processing.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Relatively high amount of kernel mode CPU time was measured. Consider investigating the source with SysCall sampling enabled.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="WinCounterCondition">
        <WinCounterName>\Process(@Instance)\% Processor Time</WinCounterName>
        <Threshold>50</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>And</CondType>
        <Condition1 xsi:type="VspPropertyBoolCondition">
          <PropertyName>IsSysCallSampling</PropertyName>
          <Invert>true</Invert>
        </Condition1>
        <Condition2 xsi:type="WinCounterRatioCondition">
          <WinCounterName>\Process(@Instance)\% Privileged Time</WinCounterName>
	  <TotalWinCounterName>\Process(@Instance)\% User Time</TotalWinCounterName>
          <Threshold>1</Threshold>
          <ThresholdTest>GreaterThan</ThresholdTest>
          <AggregationType>Average</AggregationType>
          <IsProcessSpecific>true</IsProcessSpecific>
          <MinimumNumberOfValues>10</MinimumNumberOfValues>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0026</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>29</ID>
    <Title>Unsupported CLR Version.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>An unsupported CLR version was detected during collection. Managed symbols may not resolve correctly.</GuidanceMessage>
    <Condition xsi:type="VspPropertyBoolCondition">
      <PropertyName>IsUnsupportedCLR</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0029</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>30</ID>
    <Title>Gather Tier Interaction measurements for database projects.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Gathering interaction measurements for multi-tiered applications will help you understand database usage patterns and key data access delays. Try profiling the application again with the Tier Interaction Profiling option enabled.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsTip</PropertyName>
        <Invert>true</Invert>
      </Condition1>
      <Condition2 xsi:type="CompositeCondition">
        <CondType>Or</CondType>
        <Condition1 xsi:type="CompositeCondition">
          <CondType>Or</CondType>
          <Condition1 xsi:type="FunctionThresholdPercentCondition">
            <Threshold>2</Threshold>
            <ModuleName>System.Data.dll</ModuleName>
            <FunctionName>System.Data.*</FunctionName>
            <ColumnName>InclSamplesPercent</ColumnName>
            <ComplexRegex>false</ComplexRegex>
          </Condition1>
          <Condition2 xsi:type="FunctionThresholdPercentCondition">
            <Threshold>2</Threshold>
            <ModuleName>System.Data.ni.dll</ModuleName>
            <FunctionName>System.Data.*</FunctionName>
            <ColumnName>InclSamplesPercent</ColumnName>
            <ComplexRegex>false</ComplexRegex>
          </Condition2>
        </Condition1>
        <Condition2 xsi:type="FunctionThresholdPercentCondition">
          <Threshold>2</Threshold>
          <ModuleName>System.Data.Linq.ni.dll</ModuleName>
          <FunctionName>System.Data.*</FunctionName>
          <ColumnName>InclSamplesPercent</ColumnName>
          <ComplexRegex>false</ComplexRegex>
        </Condition2>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0030</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>37</ID>
    <Title>Private Bytes is approaching architectural limits of a 32-bit process.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>The Process Private Bytes counter that measures virtual memory allocated by the process you are profiling is approaching the architectural limit of a 32-bit process. The value reported is the maximum observed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>Is64Bit</PropertyName>
        <Invert>true</Invert>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\Process(@Instance)\Private Bytes</WinCounterName>
        <Threshold>1750000000</Threshold>
        <ThresholdTest>GreaterThan</ThresholdTest>
        <AggregationType>Maximum</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>10</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0037</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>38</ID>
    <Title>High Rate of Lock contentions.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>A high rate of .NET Lock contentions is occurring. Please investigate the reason for this lock contention by running a Concurrency profile.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsResourceContention</PropertyName>
        <Invert>true</Invert>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR LocksAndThreads(@Instance)\Contention Rate / sec</WinCounterName>
        <Threshold>1</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>25</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0038</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>39</ID>
    <Title>Very High Rate of Lock contentions.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>A very high rate of .NET Lock contentions is occurring. Please investigate the reason for this lock contention by running a Concurrency profile.</GuidanceMessage>
    <Condition xsi:type="CompositeCondition">
      <CondType>And</CondType>
      <Condition1 xsi:type="VspPropertyBoolCondition">
        <PropertyName>IsResourceContention</PropertyName>
        <Invert>true</Invert>
      </Condition1>
      <Condition2 xsi:type="WinCounterCondition">
        <WinCounterName>\.NET CLR LocksAndThreads(@Instance)\Contention Rate / sec</WinCounterName>
        <Threshold>3</Threshold>
        <AggregationType>Average</AggregationType>
        <IsProcessSpecific>true</IsProcessSpecific>
        <MinimumNumberOfValues>25</MinimumNumberOfValues>
      </Condition2>
    </Condition>
    <SupersedesRule>38</SupersedesRule>
    <HelpKeyword>vs.performance.rules.DA0039</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>40</ID>
    <Title>UMS application terminated.</Title>
    <Category>Tool Guidance</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>User-Mode Scheduling (UMS) sampling profiling is not supported. The application was terminated.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>IsUmsAppTerminated</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0040</HelpKeyword>
    <Action>Error</Action>
  </Rule>
  <Rule>
    <ID>501</ID>
    <Title>Average CPU consumption by the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Average CPU consumption by the Process being profiled.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\% Processor Time</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Average</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0501</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>502</ID>
    <Title>Maximum CPU consumption by the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>This rule is for information only. The Process()\% Processor Time counter measures CPU consumption of the process you are profiling. The value reported is the maximum observed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\% Processor Time</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Maximum</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0502</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>503</ID>
    <Title>Average Working Set in Bytes for the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>This information was gathered for information only. The Process Working Set counter measures physical memory usage by the process you are profiling. The value reported is the average computed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\Working Set</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Average</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0503</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>504</ID>
    <Title>Maximum Working Set in Bytes for the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>This rule is for information only. The Process Working Set counter measures physical memory usage by the process you are profiling. The value reported is the maximum observed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\Working Set</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Maximum</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0504</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>505</ID>
    <Title>Average Private Bytes allocated for the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>This information was gathered for information only. The Process Private Bytes counter measures virtual memory allocated by the process you are profiling that cannot be shared with other processes. The value reported is the average computed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\Private Bytes</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Average</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0505</HelpKeyword>
    <Action>Information</Action>
  </Rule>
  <Rule>
    <ID>506</ID>
    <Title>Maximum Private Bytes allocated for the Process being profiled.</Title>
    <Category>Resource monitoring</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>This rule is for information only. The Process Private Bytes counter measures virtual memory allocated by the process you are profiling that cannot be shared with other processes. The value reported is the maximum observed over all measurement intervals.</GuidanceMessage>
    <Condition xsi:type="WinCounterCondition">
      <WinCounterName>\Process(@Instance)\Private Bytes</WinCounterName>
      <Threshold>0</Threshold>
      <ThresholdTest>GreaterThan</ThresholdTest>
      <AggregationType>Maximum</AggregationType>
      <IsProcessSpecific>true</IsProcessSpecific>
      <MinimumNumberOfValues>10</MinimumNumberOfValues>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0506</HelpKeyword>
    <Action>Information</Action>
  </Rule>
</Rules>
