Displaying 3 results from an estimated 3 matches for "pread_ops".
2019 Nov 30
0
[PATCH nbdkit 2/3] filters: stats: Measure time per operation
...ilters/stats/stats.c b/filters/stats/stats.c
index 45bedae..86439e7 100644
--- a/filters/stats/stats.c
+++ b/filters/stats/stats.c
@@ -60,12 +60,12 @@ static struct timeval start_t;
/* This lock protects all the stats. */
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
-static uint64_t pread_ops, pread_bytes;
-static uint64_t pwrite_ops, pwrite_bytes;
-static uint64_t trim_ops, trim_bytes;
-static uint64_t zero_ops, zero_bytes;
-static uint64_t extents_ops, extents_bytes;
-static uint64_t cache_ops, cache_bytes;
+static uint64_t pread_ops, pread_bytes, pread_usecs;
+static uint64_t pwrite_...
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 1/3] filters: stats: Show size in GiB, rate in MiB/s
...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 (fp, "elapsed time: %.3f s\n", usecs / USEC);
if (pread_ops > 0)
- fprintf (fp, "read: %" PRIu64 " ops, %" PRIu64 " bytes, %g bits/s\n",
- pread_ops, pread_bytes, calc_bps (pread_bytes, usecs));
+ fprintf (fp, "read: %" PRIu64 " ops, %.2f GiB, %.2f MiB/s\n",
+ pread_ops, prea...