<?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>Для объединений используйте StringBuilder.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Рассмотрите использование StringBuilder для строковых объединений.</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.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>По-видимому, сбор данных для файла был выполнен без должной настройки переменных окружения при помощи команды VSPerfCLREnv.cmd. Разрешение символов для управляемых двоичных данных не может быть выполнено.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>IsVsPerfCorProfMissing</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0002</HelpKeyword>
    <Action>Error</Action>
  </Rule>
  <Rule>
    <ID>3</ID>
    <Title>Множество примеров для режима ядра.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Существенная часть выборок находится в режиме ядра. Это может указывать на крупномасштабную активность ввода-вывода или высокую частоту переключения контекстов. Рассмотрите возможность повторного профилирования приложения в режиме инструментирования.</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>Постоянная занятость ЦП &gt; 75%.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Ваша загрузка процессора систематически превышает 75%. Рекомендуется использовать режим выборки для приложений, использующих ресурсы центрального процессора.</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>Часто используемые коллекции GC2.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Многие из ваших объектов собираются в поколении 2 сборки мусора.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>ManyGC2Collections</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0005</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>6</ID>
    <Title>Перезаписать Equals() для типов-значений.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Переопределите равенства и оператор равенства для типов значений.</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>Избегайте использования исключения для потока управления подпрограммы.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>На постоянной основе выдается большое количество исключений. Рассмотрите возможность меньшего использования исключений в логике программы.</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>Собрано несколько значений.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Собрано небольшое число выборочных данных. Для получения значительных результатов рекомендуется использовать более высокую частоту выборки или более долгий запуск.</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>Затратная функция GetHashCode.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Функции GetHashCode должны быть "дешевыми" и не должны выделять память. Если возможно, уменьшите сложность функции хэш-кода.</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>Затратная функция CompareTo.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Функции CompareTo должны быть простыми и не расходовать память. Если возможно, упростите функцию CompareTo.</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>Избегайте чрезмерного использования отражения.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Возможно, будет широко использоваться отражение. Эта операция потребляет много ресурсов.</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>Высокая нагрузка при выполнении String.Split/String.Substr.</Title>
    <Category>.NET Framework</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Рекомендуется снизить использование функций String.Split и String.Substring.</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>Очень высокая частота постраничного просмотра активной памяти на диске.</Title>
    <Category>MemoryAndPaging</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникла очень высокая частота постраничного просмотра памяти на диске. Возможно, память вашего приложения ограничена.</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>Высокая частота постраничного просмотра активной памяти на диске.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникла высокая частота постраничного просмотра памяти на диске. Возможно, память вашего приложения ограничена.</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-битное приложение выполняется с ограничениями управляемой памяти процесса.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Распределения управляемой памяти практически достигли стандартного ограничения для 32-битного процесса. Возможно, память вашего приложения ограничена.</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>Высокая доля сборок мусора в генерации 1.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникла относительно высокая доля сборок мусора в генерации 1. Если по замыслу большинство структур данных программы распределено и сохраняется длительное время, это обычно не является проблемой. Однако, если такое поведение является ненамеренным, приложение может прикреплять объекты. В случае сомнений можно собрать данные о распределении памяти и сведения о времени жизни объектов .NET, чтобы понять шаблон распределения памяти.</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>Высокая доля сборок мусора в генерации 2.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникла относительно высокая доля сборок мусора в генерации 2. Если по замыслу большинство структур данных программы распределено и сохраняется длительное время, это обычно не является проблемой. Однако, если такое поведение является ненамеренным, приложение может прикреплять объекты. В случае сомнений можно собрать данные о распределении памяти и сведения о времени жизни объектов .NET, чтобы понять шаблон распределения памяти.</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>Высокое время ЦП ГК.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>
      % времени в ГК имеет относительно высокое значение. Это указание на чрезмерную сумму расходов на сборку мусора может снизить скорость отклика приложения. Можно собрать данные о распределении памяти и сведения о времени жизни объектов .NET, чтобы лучше понять шаблон распределения памяти, используемый приложением.
    </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>Избыточное время ЦП ГК.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>% времени в ГК имеет очень высокое значение. Существует чрезмерная сумма расходов на сборку мусора.</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>Высокая степень времени для обработки ЦП ядра.</Title>
    <Category>ProcessorUsage</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Измерено относительно высокое значение времени обработки ЦП в режиме ядра. Следует выявить источник проблемы, включив выборку по SysCall.</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>Избыточное время для обработки ЦП ядра.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Измерено относительно высокое значение времени обработки ЦП в режиме ядра. Рассмотрите возможность выявления источника проблемы, включив выборку по SysCall.</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>Неподдерживаемая версия CLR.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Во время сбора обнаружена неподдерживаемая версия CLR. Не удается правильно разрешить управляемые символов.</GuidanceMessage>
    <Condition xsi:type="VspPropertyBoolCondition">
      <PropertyName>IsUnsupportedCLR</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0029</HelpKeyword>
    <Action>Warning</Action>
  </Rule>
  <Rule>
    <ID>30</ID>
    <Title>Соберите показания измерений взаимодействия уровней для проектов баз данных.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>FunctionDetails</ContextView>
    <GuidanceMessage>Собрав показания измерений взаимодействия многоуровневых приложений, можно понять шаблоны использования баз данных и задержки в доступе к ключевым данным. Попробуйте еще раз выполнить профилирование приложения, включив параметр профилирования взаимодействия уровней.</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>Байты исключительного пользования приближаются к архитектурным ограничениям 32-битного процесса.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Счетчик байтов исключительного пользования процесса, измеряющий виртуальную память, распределяемую профилируемым процессом, приближается к архитектурному ограничению 32-битного процесса. Полученное значение является максимальным значением, зафиксированным в течение всех интервалов измерения.</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>Большое число конфликтов при блокировке.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникло большое число конфликтов при блокировке .NET. Выявите причину этого конфликта при блокировке, запустив профиль "Параллельность".</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>Очень большое число конфликтов при блокировке.</Title>
    <Category>.NET Framework</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Возникло очень большое число конфликтов при блокировке .NET. Выявите причину этого конфликта при блокировке, запустив профиль "Параллельность".</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 завершено.</Title>
    <Category>Руководство по инструментам</Category>
    <ContextView>Summary</ContextView>
    <GuidanceMessage>Профилирование с выборкой "Планировщик пользовательского режима" (UMS) не поддерживается. Приложение было завершено.</GuidanceMessage>
    <Condition xsi:type="ProfilerSpecificPropertyCondition">
      <PropertyName>IsUmsAppTerminated</PropertyName>
    </Condition>
    <HelpKeyword>vs.performance.rules.DA0040</HelpKeyword>
    <Action>Error</Action>
  </Rule>
  <Rule>
    <ID>501</ID>
    <Title>Среднее использование ЦП профилируемым процессом.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Среднее использование ЦП профилируемым процессом.</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>Максимальное использование ЦП профилируемым процессом.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Это правило предназначено только для информации. Счетчик времени процессора Process()\% измеряет использование ЦП профилируемого процесса. Полученное значение является максимальным значением, зафиксированным в течение всех интервалов измерения.</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>Средний рабочий набор в байтах для профилируемого процесса.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Эти сведения были собраны только для информации. Счетчик рабочего набора процесса измеряет объем использования физической памяти профилируемым процессом. Полученное значение является максимальным значением, вычисленным в течение всех интервалов измерения.</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>Максимальный рабочий набор в байтах для профилируемого процесса.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Это правило предназначено только для информации. Счетчик рабочего набора процесса измеряет объем использования физической памяти профилируемым процессом. Полученное значение является максимальным значением, зафиксированным в течение всех интервалов измерения.</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>Среднее число байт исключительного пользования, распределенное для профилируемого процесса.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Эти сведения были собраны только для информации. Счетчик байт исключительного пользования процесса измеряет объем виртуальной памяти, распределенный профилируемым процессом, который нельзя использовать совместно с другими процессами. Полученное значение является максимальным значением, вычисленным в течение всех интервалов измерения.</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>Максимальное число байт исключительного пользования, распределенное для профилируемого процесса.</Title>
    <Category>Мониторинг ресурсов</Category>
    <ContextView>Marks</ContextView>
    <GuidanceMessage>Это правило предназначено только для информации. Счетчик байт исключительного пользования процесса измеряет объем виртуальной памяти, распределенный профилируемым процессом, который нельзя использовать совместно с другими процессами. Полученное значение является максимальным значением, зафиксированным в течение всех интервалов измерения.</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>
