Schema for Plugin generated Metrics

Here follows the schema that must be used by plugins to add metrics in the build-status.xml file during the build or test submissions.

There are two types of metrics:

  • OVERALL that are the metrics related the whole build or test submission.
  • MODULE that are the metrics related to a specific component.

The OVERALL metrics can be added directly inside the project tag of the build-status.xml as defined in the schema available here: build-status.xsd

In particular:

<xs:element name="project">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="modules"/>
      <xs:element ref="commands" minOccurs="0"/>
      <xs:element ref="dependencies" minOccurs="0"/>
      <xs:element ref="envs" minOccurs="0"/>
      <xs:element ref="metrics" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  
   [...]

  </xs:complexType>
</xs:element>

The MODULE metrics can be added directly inside the module tag of the build-status.xml:

<xs:element name="module">
  <xs:complexType>
    <xs:sequence maxOccurs="unbounded">
      <xs:element ref="artefacts" minOccurs="0"/>
      <xs:element ref="dependency" minOccurs="0"/>
      <xs:element ref="usedby" minOccurs="0"/>
      <xs:element ref="metrics" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>

Each metric must follow the schema available here: metrics.xsd

In particular:

<xs:element name="metrics">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="value" minOccurs="0" maxOccurs="unbounded"/>                    A metric can include a set of values to describe parts of the metric
    </xs:sequence>
    <xs:attribute name="value" type="xs:string" use="optional"/>                       The value of the metric
    <xs:attribute name="context" type="xs:string" use="optional"/>                     A comma separated list of tags describing the context in wich the metric has been computed
    <xs:attribute name="name" type="xs:string" use="optional"/>                        Name of the metric
    <xs:attribute name="minvalue" type="xs:string" use="optional"/>                    If applicable, the minimum of the range where the value can land
    <xs:attribute name="maxvalue" type="xs:string" use="optional"/>                    If applicable, the maximum of the range where the value can land
    <xs:attribute name="unit" type="xs:string" use="optional"/>                        Unit of the metric. Examples are lines of code, m/s, bugs, etc.
    <xs:attribute name="type" use="optional">                                          The numerical type of value
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="integer"/>
          <xs:enumeration value="percentage"/>
          <xs:enumeration value="float"/>
          <xs:enumeration value="boolean"/>
          <xs:enumeration value="enum"/>
          <xs:enumeration value="other"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="detailshtmllink" type="xs:string" use="optional"/>             Relative url within the reports of the HTML page with details
    <xs:attribute name="detailsxmllink" type="xs:string" use="optional"/>              Relative url within the reports of an additional XML description. Examples are JUnit
  </xs:complexType>
</xs:element>
<xs:element name="value">
  <xs:complexType>
    <xs:complexContent>
      <xs:extension base="xs:anyType">                                                 Value is a key/value pair where to store additional details of the metric
          <xs:attribute name="name" type="xs:string" use="optional"/>
          <xs:attribute name="value" type="xs:string" use="optional"/>
          <xs:attribute name="unit" type="xs:string" use="optional"/>
          <xs:attribute name="type" use="optional">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="boolean"/>
                <xs:enumeration value="text"/>
                <xs:enumeration value="string"/>
                <xs:enumeration value="binary"/>
                <xs:enumeration value="time"/>
                <xs:enumeration value="datetime"/>
                <xs:enumeration value="date"/>
                <xs:enumeration value="integer"/>
                <xs:enumeration value="float"/>
                <xs:enumeration value="enum"/>
                <xs:enumeration value="other"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:element>

-- LorenzoDini - 24 Apr 2008

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2008-04-24 - LorenzoDini
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    ETICS All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback