This will break and produce very weird results as soon as one of these counters overflows or is reset. I would calculate a *rate* from the derive values first and calculate a percentage from those.

I'd add a function called *value_to_rate()* to `common.[ch]` for that purpose, which is very similar to *rate_to_value()*:

```c
int value_to_rate (gauge_t *out_rate,
    value_t                 in_value,
    value_to_rate_state_t  *in_out_state,
    int                     in_ds_type,
    cdtime_t                in_time);
```