Revision c488c7f6 block.c
b/block.c | ||
---|---|---|
1916 | 1916 |
" rd_operations=%" PRId64 |
1917 | 1917 |
" wr_operations=%" PRId64 |
1918 | 1918 |
" flush_operations=%" PRId64 |
1919 |
" wr_total_time_ns=%" PRId64 |
|
1920 |
" rd_total_time_ns=%" PRId64 |
|
1921 |
" flush_total_time_ns=%" PRId64 |
|
1919 | 1922 |
"\n", |
1920 | 1923 |
qdict_get_int(qdict, "rd_bytes"), |
1921 | 1924 |
qdict_get_int(qdict, "wr_bytes"), |
1922 | 1925 |
qdict_get_int(qdict, "rd_operations"), |
1923 | 1926 |
qdict_get_int(qdict, "wr_operations"), |
1924 |
qdict_get_int(qdict, "flush_operations")); |
|
1927 |
qdict_get_int(qdict, "flush_operations"), |
|
1928 |
qdict_get_int(qdict, "wr_total_time_ns"), |
|
1929 |
qdict_get_int(qdict, "rd_total_time_ns"), |
|
1930 |
qdict_get_int(qdict, "flush_total_time_ns")); |
|
1925 | 1931 |
} |
1926 | 1932 |
|
1927 | 1933 |
void bdrv_stats_print(Monitor *mon, const QObject *data) |
... | ... | |
1940 | 1946 |
"'rd_operations': %" PRId64 "," |
1941 | 1947 |
"'wr_operations': %" PRId64 "," |
1942 | 1948 |
"'wr_highest_offset': %" PRId64 "," |
1943 |
"'flush_operations': %" PRId64 |
|
1949 |
"'flush_operations': %" PRId64 "," |
|
1950 |
"'wr_total_time_ns': %" PRId64 "," |
|
1951 |
"'rd_total_time_ns': %" PRId64 "," |
|
1952 |
"'flush_total_time_ns': %" PRId64 |
|
1944 | 1953 |
"} }", |
1945 | 1954 |
bs->nr_bytes[BDRV_ACCT_READ], |
1946 | 1955 |
bs->nr_bytes[BDRV_ACCT_WRITE], |
... | ... | |
1948 | 1957 |
bs->nr_ops[BDRV_ACCT_WRITE], |
1949 | 1958 |
bs->wr_highest_sector * |
1950 | 1959 |
(uint64_t)BDRV_SECTOR_SIZE, |
1951 |
bs->nr_ops[BDRV_ACCT_FLUSH]); |
|
1960 |
bs->nr_ops[BDRV_ACCT_FLUSH], |
|
1961 |
bs->total_time_ns[BDRV_ACCT_WRITE], |
|
1962 |
bs->total_time_ns[BDRV_ACCT_READ], |
|
1963 |
bs->total_time_ns[BDRV_ACCT_FLUSH]); |
|
1952 | 1964 |
dict = qobject_to_qdict(res); |
1953 | 1965 |
|
1954 | 1966 |
if (*bs->device_name) { |
... | ... | |
3160 | 3172 |
assert(type < BDRV_MAX_IOTYPE); |
3161 | 3173 |
|
3162 | 3174 |
cookie->bytes = bytes; |
3175 |
cookie->start_time_ns = get_clock(); |
|
3163 | 3176 |
cookie->type = type; |
3164 | 3177 |
} |
3165 | 3178 |
|
... | ... | |
3170 | 3183 |
|
3171 | 3184 |
bs->nr_bytes[cookie->type] += cookie->bytes; |
3172 | 3185 |
bs->nr_ops[cookie->type]++; |
3186 |
bs->total_time_ns[cookie->type] += get_clock() - cookie->start_time_ns; |
|
3173 | 3187 |
} |
3174 | 3188 |
|
3175 | 3189 |
int bdrv_img_create(const char *filename, const char *fmt, |
Also available in: Unified diff