Edgewall Software

Version 2 (modified by cmlenz, 19 years ago) (diff)

Add information on the BDB XML backend

Bitten Data Storage

The data generated by automated builds can almost always be mapped to the physical and/or the logical view of the code base, where the physical view corresponds to files and line numbers, while the logical view is composed of units such as packages, classes and functions. Specific metrics basically annotate either view with the extracted information. The structure of the annotation, however, depends entirely on the type of metric.

For example, test results might have the following attributes:

  • Name of the test
  • Result: success, failure or error
  • Error message and stack trace (in case of an error or failure)
  • Output of the test (standard error and output streams)
  • Time it took to execute the test

Other data such as compilation errors and warnings would only consist of the message of the error or warning. Code coverage would annotate each line in the code base with the number of times that line has been executed, and in addition accumulate coverage statistics on a per-file or per-class basis.

XML Database Backend

Semi-structured data such as this is not a good candidate for storage in a relational database. Instead, native XML databases are rather well suited for storing semi-structured data. Bitten therefore uses Berkeley DB XML to store reports generated by builds. BDB XML supports the XQuery standard and thereby enables efficient and powerful analysis and aggregation of the collected software metrics.

Note that Bitten allows an alternative XQuery capable data store being used instead of BDB XML.

Every report is stored as a self-contained document in the XML DB. It is associated with a specific build step using metadata:

config
The name of the build configuration the report belongs to
build
The unique ID of the associated build
step
The name of the build step

The reports themselves are stored verbatim as received from the build slave, for example:

<report type="unittest">
  <test duration="0.073" status="success" fixture="bitten.tests.model.BuildConfigTestCase" name="test_config_update_name" file="bitten/tests/model.py"/>
  ...
</report>

Querying the Report Store

TBW

Attachments (1)

Download all attachments as: .zip