Commit 00abfb48 authored by Per Cederqvist's avatar Per Cederqvist

Changed 112=get_stats so that it returns average, ascent rate and

descent rate for each measured value.  Return the values as FLOAT, not
a fixed-point value stored in an INT32.
parent 66acc08b
2003-07-25 Per Cederqvist <ceder@ceder.dyndns.org>
Changed 112=get_stats so that it returns average, ascent rate and
descent rate for each measured value. Return the values as FLOAT,
not a fixed-point value stored in an INT32.
* src/server/testsuite/lyskomd.0/01.exp: Updated for the new look
of get-stats and the new members of enum stat_type.
* src/server/testsuite/lyskomd.0/03.exp: Ditto.
* src/server/testsuite/config/unix.exp (any_float): New constant.
* src/server/stats.h (enum stat_type): Removed STAT_FIRST_EVENT,
STAT_PROCESSED_CALLS, STAT_PROCESSED_DNS, STAT_PROCESSED_IDENT,
STAT_RUN_QUEUE_ENTER, STAT_RUN_QUEUE_LEAVE. Added STAT_REQUESTS.
* src/server/stats.c (enum value_type): New enum.
(status): Added a new dimension: the type of the value (average,
ascending rate, or descending rate.
(copy): Ditto.
(init_stats): Handle the new dimension.
(update_one_stat): New static function, that updates a single
dimension.
(update_stat): Update the proper dimensions.
(check_one_stat): New static function, that checks a single
dimension.
(check_stat): Check all dimensions.
(name): Removed STAT_PROCESSED_CALLS, STAT_PROCESSED_DNS,
STAT_PROCESSED_IDENT, STAT_RUN_QUEUE_ENTER, STAT_RUN_QUEUE_LEAVE.
Added STAT_REQUESTS.
(get_stats): Now returns a Stats_list. Don't multiply the result
by 100.
* src/server/prot-a.c (prot_a_reply): Handle rt_stats_list.
* src/server/prot-a-output.h (prot_a_output_stats_list): New
function.
* src/server/prot-a-output.c (prot_a_output_float): New static
function.
(prot_a_output_stats): Ditto.
(prot_a_output_stats_list): New function.
* src/server/fncdef.txt: Changed return type of get_stats to
Stats_list.
* src/server/connections.h (enum res_type): Added rt_stats_list.
(union result_holder): Added stats_list.
* src/server/connections.c (queue_add): Don't update
STAT_RUN_QUEUE_ENTER.
(queue_remove): Don't update STAT_RUN_QUEUE_LEAVE.
(parse_unparsed): Update STAT_REQUESTS instead of
STAT_PROCESSED_CALLS.
(get_host_name): Don't update STAT_PROCESSED_DNS.
* src/include/services.h (get_stats): Changed return type to
Stats_list.
* src/include/kom-types.h (Stats): New struct.
(Stats_list): New struct.
* doc/Protocol-A.texi (Simple Data Types): New datatype: FLOAT.
(Statistics): Added the "Stats" data type.
Updated the description of the "when" field of
"Stats-Description".
(get-stats): Return an array of Stats, not INT32.
(Measured Properties): There are no longer two kinds of values.
2003-07-24 Per Cederqvist <ceder@ceder.dyndns.org>
Implement 111=get_stats_description and 112=get_stats.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment