search for: calc_bp

Displaying 7 results from an estimated 7 matches for "calc_bp".

Did you mean: calc_bps
2019 Nov 30
0
[PATCH nbdkit 1/3] filters: stats: Show size in GiB, rate in MiB/s
...#include "tvdiff.h" +#define MiB 1048576.0 +#define GiB 1073741824.0 +#define USEC 1000000.0 + static char *filename; static bool append; static FILE *fp; @@ -64,34 +68,34 @@ static uint64_t extents_ops, extents_bytes; static uint64_t cache_ops, cache_bytes; static inline double -calc_bps (uint64_t bytes, int64_t usecs) +calc_mibps (uint64_t bytes, int64_t usecs) { - return 8.0 * bytes / usecs * 1000000.; + return bytes / MiB / usecs * USEC; } static inline void print_stats (int64_t usecs) { - fprintf (fp, "elapsed time: %g s\n", usecs / 1000000.); + fprintf (f...
2019 Nov 30
5
[PATCH nbdkit 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s. - Measure time per operation, providing finer grain stats - Add missing stats for flush I hope that these changes will help to understand and imporve virt-v2v performance. Nir Soffer (3): filters: stats: Show size in GiB, rate in MiB/s filters: stats: Measure time per operation filters: stats: Add flush stats filters/stats/stats.c | 117
2019 Nov 30
0
[PATCH nbdkit v2 1/3] filters: stats: Add size in GiB, show rate in MiB/s
...;tvdiff.h" +#define MiB 1048576.0 +#define GiB 1073741824.0 +#define USEC 1000000.0 + static char *filename; static bool append; static FILE *fp; @@ -70,29 +74,35 @@ static stat extents_st = { "extents" }; static stat cache_st = { "cache" }; static inline double -calc_bps (uint64_t bytes, int64_t usecs) +calc_rate (uint64_t bytes, int64_t usecs) { - return 8.0 * bytes / usecs * 1000000.; + return bytes / MiB / usecs * USEC; } static inline void print_stat (const stat *st, int64_t usecs) { if (st->ops > 0) - fprintf (fp, "%s: %" PRIu64...
2019 Dec 03
2
[PATCH nbdkit] filters: stats: Show size and rate in human size
...ilters/stats/stats.c index 919dc16..e10307c 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -71,18 +71,40 @@ static stat extents_st = { "extents" }; static stat cache_st = { "cache" }; static stat flush_st = { "flush" }; -static inline double -calc_bps (uint64_t bytes, int64_t usecs) +#define KiB 1024 +#define MiB 1048576 +#define GiB 1073741824 + +static char * +humansize(uint64_t bytes) { - return 8.0 * bytes / usecs * 1000000.; + char buf[32]; + + if (bytes < KiB) + snprintf (buf, sizeof(buf), "%" PRIu64 " byt...
2019 Nov 30
1
Re: [PATCH nbdkit 1/3] filters: stats: Show size in GiB, rate in MiB/s
...> +#define GiB 1073741824.0 > +#define USEC 1000000.0 > + > static char *filename; > static bool append; > static FILE *fp; > @@ -64,34 +68,34 @@ static uint64_t extents_ops, extents_bytes; > static uint64_t cache_ops, cache_bytes; > > static inline double > -calc_bps (uint64_t bytes, int64_t usecs) > +calc_mibps (uint64_t bytes, int64_t usecs) > { > - return 8.0 * bytes / usecs * 1000000.; > + return bytes / MiB / usecs * USEC; > } The idea isn't bad, but I think we can lose data doing this. What happens if the rate is substantially le...
2019 Nov 30
4
[PATCH nbdkit v2 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s - Measure time per operation, providing finer grain stats - Add total stats for understanding system throughput - Add missing stats for flush I hope that these changes will help to understand and improve virt-v2v performance. Changes since v1: - Keep bytes values - Increase precision to 0.001 GiB and 0.001 MiB/s - Add total stats - Show time before
2019 May 16
27
[nbdkit PATCH v2 00/24] implement NBD_CMD_CACHE
Since v1: - rework .can_cache to be tri-state, with default of no advertisement (ripple effect through other patches) - add a lot more patches in order to round out filter support And in the meantime, Rich pushed NBD_CMD_CACHE support into libnbd, so in theory we now have a way to test cache commands through the entire stack. Eric Blake (24): server: Internal hooks for implementing