Custom Charts issue

I'm using phploc tool during build process which geterates an XML in it's own format:

<?xml version="1.0" encoding="UTF-8"?>
<phploc>
  <directories>30</directories>
  <files>71</files>
  <loc>2655</loc>
  <nclocClasses>1237</nclocClasses>
  <cloc>1403</cloc>
  <ncloc>1252</ncloc>
  <ccn>43</ccn>
  <ccnMethods>37</ccnMethods>
  <interfaces>0</interfaces>
  <classes>52</classes>
  <abstractClasses>1</abstractClasses>
  <concreteClasses>51</concreteClasses>
  <anonymousFunctions>0</anonymousFunctions>
  <functions>0</functions>
  <methods>95</methods>
  <publicMethods>85</publicMethods>
  <nonPublicMethods>10</nonPublicMethods>
  <nonStaticMethods>95</nonStaticMethods>
  <staticMethods>0</staticMethods>
  <constants>9</constants>
  <classConstants>4</classConstants>
  <globalConstants>5</globalConstants>
  <testClasses>9</testClasses>
  <testMethods>31</testMethods>
  <ccnByLoc>0.034345047923323</ccnByLoc>
  <ccnByNom>1.3894736842105</ccnByNom>
  <nclocByNoc>23.788461538462</nclocByNoc>
  <nclocByNom>13.021052631579</nclocByNom>
  <namespaces>0</namespaces>
</phploc>


Then I apply XSLT:
 <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:template match="/phploc">
          <build>
               <statisticValue key="directories" value="{directories}"/>
               <statisticValue key="files" value="{files}"/>
               <statisticValue key="loc" value="{loc}"/>
               <statisticValue key="nclocClasses" value="{nclocClasses}"/>
               <statisticValue key="cloc" value="{cloc}"/>
               <statisticValue key="ncloc" value="{ncloc}"/>
               <statisticValue key="ccn" value="{ccn}"/>
               <statisticValue key="ccnMethods" value="{ccnMethods}"/>
               <statisticValue key="interfaces" value="{interfaces}"/>
               <statisticValue key="classes" value="{classes}"/>
               <statisticValue key="abstractClasses" value="{abstractClasses}"/>
               <statisticValue key="concreteClasses" value="{concreteClasses}"/>
               <statisticValue key="anonymousFunctions" value="{anonymousFunctions}"/>
               <statisticValue key="functions" value="{functions}"/>
               <statisticValue key="methods" value="{methods}"/>
               <statisticValue key="publicMethods" value="{publicMethods}"/>
               <statisticValue key="nonPublicMethods" value="{nonPublicMethods}"/>
               <statisticValue key="nonStaticMethods" value="{nonStaticMethods}"/>
               <statisticValue key="staticMethods" value="{staticMethods}"/>
               <statisticValue key="constants" value="{constants}"/>
               <statisticValue key="classConstants" value="{classConstants}"/>
               <statisticValue key="globalConstants" value="{globalConstants}"/>
               <statisticValue key="testClasses" value="{testClasses}"/>
               <statisticValue key="testMethods" value="{testMethods}"/>
               <statisticValue key="namespaces" value="{namespaces}"/>
               <!--
               <ccnByLoc>0.043478260869565</ccnByLoc> 
               <ccnByNom>1.3894736842105</ccnByNom> 
               <nclocByNoc>26</nclocByNoc> 
               <nclocByNom>14.231578947368</nclocByNom> 
               -->
          </build>
     </xsl:template>
</xsl:stylesheet> 


And get D:\TeamCity\buildAgent\work\2ced091824a6e6f3\teamcity-info.xml (but it's written in one line)

<?xml version="1.0" encoding="UTF-8"?> <build>      <statisticValue key="directories" value="30" />      <statisticValue key="files" value="71" />      <statisticValue key="loc" value="2655" />      <statisticValue key="nclocClasses" value="1237" />      <statisticValue key="cloc" value="1403" />      <statisticValue key="ncloc" value="1252" />      <statisticValue key="ccn" value="43" />      <statisticValue key="ccnMethods" value="37" />      <statisticValue key="interfaces" value="0" />      <statisticValue key="classes" value="52" />      <statisticValue key="abstractClasses" value="1" />      <statisticValue key="concreteClasses" value="51" />      <statisticValue key="anonymousFunctions" value="0" />      <statisticValue key="functions" value="0" />      <statisticValue key="methods" value="95" />      <statisticValue key="publicMethods" value="85" />      <statisticValue key="nonPublicMethods" value="10" />      <statisticValue key="nonStaticMethods" value="95" />      <statisticValue key="staticMethods" value="0" />      <statisticValue key="constants" value="9" />      <statisticValue key="classConstants" value="4" />      <statisticValue key="globalConstants" value="5" />      <statisticValue key="testClasses" value="9" />      <statisticValue key="testMethods" value="31" />      <statisticValue key="namespaces" value="0" /> </build>


Here is contents of D:\TeamCity\.BuildServer\config\main-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<server rootURL="http://localhost:8111">
  <db-compact>
    <scheduler hour="3" minute="0" />
  </db-compact>
  <auth-type>
    <login-module />
    <guest-login allowed="false" guest-username="guest" />
    <free-registration allowed="true" />
  </auth-type>
  <artifacts maxArtifactSize="300000000" />
  <report-tab title="Code Coverage" basePath="coverage.zip" />
  <report-tab title="JavaDoc" basePath="javadoc.zip" />
  <report-tab title="PhpDocumentor" basePath="phpdoc.zip" />
  <report-tab title="CodeBrowser" basePath="phpcb.zip" />
  <comment-transformation>
    <transformation-pattern search="((https?://|ftp://|file://|mailto:)[\w`~@#$%^&amp;*-=|\/{}()\[\];:&quot;'&lt;&gt;?\.]+(?&lt;=[^\.,;&quot;'`\)\]}]))" replace="&lt;a target=&quot;_blank&quot; title=&quot;Click to open this link in a new window&quot; href=&quot;$1&quot;&gt;$1&lt;/a&gt;" description="Links transformation (default)" />
    <transformation-pattern search="(&#xD;?&#xA;|&#xD;)" replace="&lt;br&gt;" description="Line feed transformation (default)" />
  </comment-transformation>
     <graph title="Custom data" seriesTitle="phploc">
          <valueType key="directories" title="Directories" />
          <valueType key="files" title="Files" />
          <valueType key="loc" title="Lines of Code (LOC)" />
          <valueType key="nclocClasses" title="nclocClasses" />
          <valueType key="cloc" title="Comment Lines of Code (CLOC)" />




          <valueType key="ncloc" title="Non-Comment Lines of Code (NCLOC)" />
          <valueType key="ccn" title="Cyclomatic Complexity Number" />
          <valueType key="ccnMethods" title="Cyclomatic Complexity Number for Methods" />
          <valueType key="interfaces" title="Interfaces" />
          <valueType key="classes" title="Classes" />
          <valueType key="abstractClasses" title="Abstract Classes" />
          <valueType key="concreteClasses" title="Concrete Classes" />
          <valueType key="anonymousFunctions" title="Anonymous Functions" />
          <valueType key="functions" title="Functions" />
          <valueType key="methods" title="Methods" />
          <valueType key="publicMethods" title="Public Methods" />
          <valueType key="nonPublicMethods" title="Non-Public Methods" />
          <valueType key="nonStaticMethods" title="Non-Static Methods" />
          <valueType key="staticMethods" title="Static Methods" />
          <valueType key="constants" title="Constants" />
          <valueType key="classConstants" title="Class Constants" />
          <valueType key="globalConstants" title="Global Constants" />
          <valueType key="testClasses" title="Test Classes" />
          <valueType key="testMethods" title="Test Methods" />
          <valueType key="namespaces" title="Namespaces" />
     </graph>
</server>


So question is why there is no additional charts at *Project* / *Build Configuration* / Statistics page?

Also teamcity-info.xml doesn't appears in artifacts.

Using TeamCity Enterprise 6.0 EAP (build 15400)
4 comments

Alexander,

We lost teamcity-info.xml processing at some point in TeamCity 6.0 EAPs, sorry for that. Was discovered and fixed recently, will be avaialble with the next EAP build.
For now, it seems that adding teamcity-info.xml into artifacts manually should make it being processed again.

0

I'll try it tonight, thanks for your fast reply.

0

Is there relates issue in bug tracker?

0

Please sign in to leave a comment.