The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CPAN::Testers::Schema::Result::Stats - The basic statistics information extracted from test reports

VERSION

version 0.002

SYNOPSIS

    my $schema = CPAN::Testers::Schema->connect( $dsn, $user, $pass );

    # Retrieve a row
    my $row = $schema->resultset( 'Stats' )->first;
    # pass from doug@example.com (Doug Bell) using Perl 5.20.1 on darwin
    say sprintf "%s from %s using Perl %s on %s",
        $row->state,
        $row->tester,
        $row->perl,
        $row->osname;

    # Create a new row
    my %new_row_data = (
        state => 'fail',
        guid => '00000000-0000-0000-0000-000000000000',
        tester => 'doug@example.com (Doug Bell)',
        postdate => '201608',
        dist => 'My-Dist',
        version => '0.001',
        platform => 'darwin-2level',
        perl => '5.22.0',
        osname => 'darwin',
        osvers => '10.8.0',
        fulldate => '201608120401',
        type => 2,
        uploadid => 287102,
    );
    my $new_row = $schema->resultset( 'Stats' )->insert( \%new_row_data );

DESCRIPTION

This table (cpanstats in the database) hold the basic, vital statistics extracted from test reports. This data is used to generate reports for the web application and web APIs.

See ATTRIBUTES below for the full list of attributes.

ATTRIBUTES

id

The ID of the row. Auto-generated.

guid

The UUID of this report from the Metabase, stored in standard hex string representation.

state

The state of the report. One of:

pass

The tests passed and everything went well.

fail

The tests ran but failed.

na

This dist is incompatible with the tester's Perl or OS.

unknown

The state could not be determined.

invalid reports, which are marked that way by dist authors when the problem is on the tester's machine, are handled by the "type" field.

postdate

A truncated date, consisting only of the year and month in YYYYMM format.

tester

The e-mail address of the tester who sent this report, optionally with the tester's name as a comment (doug@example.com (Doug Bell)).

dist

The distribution that was tested.

version

The version of the distribution.

platform

The Perl platform string (from $Config{archname}).

perl

The version of Perl that was used to run the tests (from $Config{version}).

osname

The name of the operating system (from $Config{osname}).

osvers

The version of the operating system (from $Config{osvers}).

fulldate

The full date of the report, with hours and minutes, in YYYYMMDDHHNN format.

type

A field that declares the status of this row. The only current possibilities are:

2

This is a valid Perl 5 test report

3

This report was marked invalid by a user

uploadid

The ID of the upload that created this dist. Related to the uploadid field in the uploads table (see CPAN::Testers::Schema::Result::Uploads).

METHODS

upload

Get the related row in the `uploads` table. See CPAN::Testers::Schema::Result::Upload.

SEE ALSO

DBIx::Class::Row
CPAN::Testers::Schema
CPAN::Testers::Data::Generator

This module processes the data and writes to this table.

http://github.com/cpan-testers/cpantesters-project

For an overview of how the CPANTesters project works, and for information about project goals and to get involved.

AUTHORS

  • Oriol Soriano <oriolsoriano@gmail.com>

  • Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Oriol Soriano, Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 464:

Expected text after =item, not a number