search for: extents_st

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

Did you mean: extents_str
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 Nov 30
0
[PATCH nbdkit v2 2/3] filters: stats: Measure time per operation
...static inline void print_stats (int64_t usecs) { - fprintf (fp, "elapsed time: %.3f s\n", usecs / USEC); - - print_stat (&pread_st, usecs); - print_stat (&pwrite_st, usecs); - print_stat (&trim_st, usecs); - print_stat (&zero_st, usecs); - print_stat (&extents_st, usecs); - print_stat (&cache_st, usecs); + const stat total_st = { + .name = "total", + .ops = pread_st.ops + + pwrite_st.ops + + trim_st.ops + + zero_st.ops + + extents_st.ops, + .bytes = pread_st.bytes + + pwrite_st.bytes +...
2019 Nov 30
0
[PATCH nbdkit v2 1/3] filters: stats: Add size in GiB, show rate in MiB/s
...ers/stats/stats.c +++ b/filters/stats/stats.c @@ -49,6 +49,10 @@ #include "cleanup.h" #include "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...
2019 Nov 30
0
[PATCH nbdkit v2 3/3] filters: stats: Add flush stats
...sertions(+), 6 deletions(-) diff --git a/filters/stats/stats.c b/filters/stats/stats.c index 2c92c65..1d0f242 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -73,6 +73,7 @@ static stat trim_st = { "trim" }; static stat zero_st = { "zero" }; static stat extents_st = { "extents" }; static stat cache_st = { "cache" }; +static stat flush_st = { "flush" }; static inline double calc_rate (uint64_t bytes, int64_t usecs) @@ -83,14 +84,20 @@ calc_rate (uint64_t bytes, int64_t usecs) static inline void print_stat (const stat *...
2019 Dec 04
0
[PATCH nbdkit v3 5/5] filters: stats: Show total stats
...s/stats.c index fbd6b87..0759ceb 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -125,10 +125,27 @@ print_stat (const stat *st, int64_t usecs) } } +static void +print_totals (uint64_t usecs) +{ + uint64_t ops = pread_st.ops + pwrite_st.ops + trim_st.ops + zero_st.ops + + extents_st.ops + flush_st.ops; + uint64_t bytes = pread_st.bytes + pwrite_st.bytes + trim_st.bytes + + zero_st.bytes; + char *size = humansize (bytes); + char *rate = humanrate (bytes, usecs); + + fprintf (fp, "total: %" PRIu64 " ops, %.6f s, %s, %s/s\n", + ops, usecs / 10...
2019 Dec 03
2
[PATCH nbdkit] filters: stats: Show size and rate in human size
...s, 32.64 MiB, 24.48 MiB/s + trim: 33 ops, 1.00 GiB, 767.75 MiB/s + flush: 9 ops, 0 bytes, 0 bytes/s =head1 PARAMETERS diff --git a/filters/stats/stats.c b/filters/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)...
2019 Dec 04
6
[PATCH nbdkit v3 0/5] filters: stats: More useful, more friendly
This is the third attempt to make the stats filter better. This time I kept the changes minimal to make it eaier to make progress. I tried the idea of showing global stats in separate "total" section, but it became messy and hard to implemnt, so I tried the simpler solution of showing both operation rate and total rate in the operation line. Nir Soffer (5): filters: stats: Add