author | Florian Forster <octo@collectd.org> | |
Thu, 18 Oct 2012 10:43:30 +0000 (12:43 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Thu, 18 Oct 2012 10:46:59 +0000 (12:46 +0200) |
Conflicts:
src/utils_db_query.c
src/utils_db_query.h
src/utils_db_query.c
src/utils_db_query.h
1 | 2 | |||
---|---|---|---|---|
src/disk.c | patch | | diff1 | | diff2 | | blob | history |
src/network.c | patch | | diff1 | | diff2 | | blob | history |
src/utils_db_query.c | patch | | diff1 | | diff2 | | blob | history |
src/utils_db_query.h | patch | | diff1 | | diff2 | | blob | history |
diff --cc src/disk.c
index fde0dcde9abd5112c48633a6dcd588ef8bb0f69b,4a78f1bdbfb060ad1c57109dbe6acaf8c9c4dd2a..7411c22588abd4e409f25027d784bd83b62af62a
--- 1/src/disk.c
--- 2/src/disk.c
+++ b/src/disk.c
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)
{
diff --cc src/network.c
Simple merge
diff --cc src/utils_db_query.c
index 7e7504dc9fc2a0bed52000b6da08e7d7dd683663,675272c049d52d671d7bd50a3ebfccc04b77f9f8..aadf9c5ec1d7f6a4879a5701ebe19f2a25d23633
+++ b/src/utils_db_query.c
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;
diff --cc src/utils_db_query.h
index 727be03647714e8bc76f6b4d5403508eeca74616,7856bdbed73865dde8f79332bc4d2dbe2ba6fe81..b6f4cea00d6351c8c0edcf97ab44d0a45cfc7e86
+++ b/src/utils_db_query.h
*/
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 *