plugin_dispatch_values (&vl);
} /* void disk_submit */
- double avg_time_incr = ((double) interval_g) * avg_time;
+ #if KERNEL_LINUX
+ static counter_t disk_calc_time_incr (counter_t delta_time, counter_t delta_ops)
+ {
+ double avg_time = ((double) delta_time) / ((double) delta_ops);
++ double avg_time_incr = CDTIME_T_TO_DOUBLE (interval_g) * avg_time;
+
+ return ((counter_t) (avg_time_incr + .5));
+ }
+ #endif
+
#if HAVE_IOKIT_IOKITLIB_H
static signed long long dict_get_value (CFDictionaryRef dict, const char *key)
{
return (0);
} /* }}} int udb_query_handle_result */
- int udb_query_prepare_result (const udb_query_t const *q, /* {{{ */
+ int udb_query_prepare_result (udb_query_t const *q, /* {{{ */
udb_query_preparation_area_t *prep_area,
const char *host, const char *plugin, const char *db_name,
- char **column_names, size_t column_num, int interval)
+ char **column_names, size_t column_num, cdtime_t interval)
{
udb_result_preparation_area_t *r_area;
udb_result_t *r;
*/
int udb_query_check_version (udb_query_t *q, unsigned int version);
- int udb_query_prepare_result (const udb_query_t const *q,
+ int udb_query_prepare_result (udb_query_t const *q,
udb_query_preparation_area_t *prep_area,
const char *host, const char *plugin, const char *db_name,
- char **column_names, size_t column_num, int interval);
+ char **column_names, size_t column_num, cdtime_t interval);
- int udb_query_handle_result (const udb_query_t const *q,
+ int udb_query_handle_result (udb_query_t const *q,
udb_query_preparation_area_t *prep_area, char **column_values);
- void udb_query_finish_result (const udb_query_t const *q,
+ void udb_query_finish_result (udb_query_t const *q,
udb_query_preparation_area_t *prep_area);
udb_query_preparation_area_t *