Displaying 5 results from an estimated 5 matches for "flush_st".
Did you mean:
flush_mm
2019 Nov 30
0
[PATCH nbdkit v2 3/3] filters: stats: Add flush stats
...5..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 *st)
{
- if (st->ops > 0)
- fprintf (fp, "%s: %" PRIu64 " ops, %.3f s, %&...
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 Dec 04
0
[PATCH nbdkit v3 5/5] filters: stats: Show total stats
...bd6b87..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 / 1000000.0, maybe...
2019 Dec 03
2
[PATCH nbdkit] filters: stats: Show size and rate in human size
...=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)
{
- return 8.0 * bytes / usecs * 1000000.;
+ char buf[32];
+
+ if (bytes < KiB)
+...
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