mantisbt:performance_counters_requirements
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mantisbt:performance_counters_requirements [2006/09/28 02:30] – created vboctor | mantisbt:performance_counters_requirements [2011/11/16 07:38] (current) – The page rendering was broken (maybe since new PHP version on mantisbt.org). Added new line to fix it at end of file. atrol | ||
---|---|---|---|
Line 12: | Line 12: | ||
* mantis_perf_counters_def_table | * mantis_perf_counters_def_table | ||
- | | + | |
* name = string (64) | * name = string (64) | ||
+ | * description = string (255) | ||
* function = Name of function to call to calculate the value (this is prefixed by perf_counter_calc_*). | * function = Name of function to call to calculate the value (this is prefixed by perf_counter_calc_*). | ||
* params = string (255) - format is typically as follows: project_id=2, | * params = string (255) - format is typically as follows: project_id=2, | ||
* frequency = frequency in hours (e.g. 24 for performance counters that should be calculated daily). | * frequency = frequency in hours (e.g. 24 for performance counters that should be calculated daily). | ||
* enabled = boolean | * enabled = boolean | ||
+ | * next_calc_due - datetime - the timestamp when the next calculation is due. | ||
+ | * date_created - datetime | ||
+ | * last_updated - datetime | ||
* mantis_perf_counters_val_table | * mantis_perf_counters_val_table | ||
- | | + | |
* perf_counter_def_id | * perf_counter_def_id | ||
- | * timestamp | + | * timestamp |
- | * value (int) or double? | + | * value (int) |
===== Cronjob Script ===== | ===== Cronjob Script ===== | ||
Line 30: | Line 34: | ||
< | < | ||
- | for each enabled counter | + | for each enabled counter |
- | if no previous recorded values or last recorded greater than " | + | |
calculate the performance counter and record the value. | calculate the performance counter and record the value. | ||
+ | update the next_calc_due on the counter definition. | ||
</ | </ | ||
Line 44: | Line 48: | ||
* Modify counters: We shouldn' | * Modify counters: We shouldn' | ||
* Delete counters: Deletes the counter definition as well as all historical values. | * Delete counters: Deletes the counter definition as well as all historical values. | ||
+ | * Enable/ | ||
+ | |||
+ | ===== Out-of-the-box-counters ===== | ||
+ | |||
+ | * Number of issues | ||
+ | * status (optional) (e.g. value|value|value) | ||
+ | * priority (optional) (e.g. value|value|value) | ||
+ | * severity (optional) (e.g. value|value|value) | ||
+ | * category (optional) | ||
+ | * Number of opened issues since last calculation based on date_submitted | ||
+ | * priority (same as above) | ||
+ | * severity (same as above) | ||
+ | * category (save as above) | ||
+ | * Number of resolved issues | ||
+ | * This can be done using tokens. | ||
+ | |||
+ | ===== New Performance Calculation Functions ===== | ||
+ | |||
+ | A company wants to keep a performance counter for the number of issues that has priority 1 and have been open for more than 3 days. This counter is to be called " | ||
+ | |||
+ | <code php> | ||
+ | function perf_counter_calc_sla_slips( $p_params ) { | ||
+ | $t_priority = $p_params[' | ||
+ | $t_days = $p_params[' | ||
+ | |||
+ | // calculate the number here and store in $t_counter. | ||
+ | |||
+ | return $t_counter; | ||
+ | } | ||
+ | </ | ||
===== Brainstorming ===== | ===== Brainstorming ===== | ||
Line 52: | Line 86: | ||
* we should add a view access level to the definition table. | * we should add a view access level to the definition table. | ||
* The other option is to store this information in the database and have the access control implemented in the reports that access the performance counters. | * The other option is to store this information in the database and have the access control implemented in the reports that access the performance counters. | ||
+ | * Ability to use saved filters to calculate values for counters. | ||
+ | * Template Counters - it would be very useful to have a counter that counts the number of open issues for a developer or a category, then be able to run this counter for every developer or every category, rather than having to define a counter record per developer or per category. | ||
+ | |||
===== Feedback ===== | ===== Feedback ===== | ||
- | Put your feedback | + | I don't understand the original premise, that Mantis only has a snapshot of information as at the current time. It already contain hsitorical data with fields storing when a task was submitted, etc. So the example above " |
+ | |||
+ | In projects I've worked on, de-normalising the database |
mantisbt/performance_counters_requirements.1159425019.txt.gz · Last modified: 2008/10/29 04:32 (external edit)