Fix for 887638: pt-query-digest prints negative byte offset

This commit is contained in:
Brian Fraser
2012-11-15 15:17:03 -03:00
parent 2c9ebf33e2
commit 06115737ee
3 changed files with 51 additions and 8 deletions

View File

@@ -524,7 +524,7 @@ sub event_report {
# First line like:
# Query 1: 9 QPS, 0x concurrency, ID 0x7F7D57ACDD8A346E at byte 5 ________
my $line = sprintf(
'# %s %d: %s QPS, %sx concurrency, ID 0x%s at byte %d ',
'# %s %d: %s QPS, %sx concurrency, ID 0x%s at byte %.f ',
($ea->{groupby} eq 'fingerprint' ? 'Query' : 'Item'),
$args{rank} || 0,
shorten($qps || 0, d=>1_000),