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

NAME

WebService::TestSystem::Metrics - Metrics about use of the testing system.

SYNOPSIS

    my $metrics = new WebService::TestSystem::Metrics;

DESCRIPTION

WebService::TestSystem::Metrics provides several routines to extract info about the testing system including number of users, tests that are getting run heavily, etc. These are intended for high level reports for users, managers, and administrators about the system itself.

The routines in this module are all considered 'public access', thus no authentication is required for retrieving them.

FUNCTIONS

new(%args)

Establishes a new WebService::TestSystem instance. This sets up a database connection.

You must give it a valid WebService::TestSystem object in the 'app' argument.

Optionally, you can also specify the site domain name (default 'osdl.org') in the site_domain argument. This is used to determine who the 'external users' are for a given site installation. Set this to the domain name for your company to override it.

get_error()

Returns the most recent error message. If any of this module's routines return undef, this routine can be called to retrieve a message about what happened. If several errors have occurred, this will only return the most recently encountered one.

metrics_requests_per_month([$year][, $user_type])

Returns usage details of number of tests run and number users per month for the given year (or the current year if $year is not defined. By default returns data for all users. Specify 'external' for $user_type to limit it to only users with non-'@osdl.org' email addresses.

Returns undef if $year or $user_type are not properly defined, or if it could not obtain a database handle.

Fields returned: month year total_requests requestors

metrics_test_run_time($year, $month)

Returns the total hours per test for a given month

Fields returned: id test count total_run_time ave_run_time

metrics_distros_tested_per_month([$year])

Returns listing of different distros tested each month.

Fields returned: month count

metrics_test_request_status_totals()

Returns a list of total requests in each status.

Fields returned: status total

metrics_queue_lengths()

Returns the number of queued test requests for each host type

Returns the number of test requests for the given host type, for each status type.

metrics_queue_age([$age])

Returns the number of test requests of different states for the past $age (default 60) days.

metrics_patches_queued()

metrics_monthly_tests_per_host()

Returns the number of test requests per host per month for the last 90 days.