adb: make the push summary fit in 80 columns.
Elide $ANDROID_PRODUCT_OUT for a large saving: /data/: 2 files pushed. 734 files skipped. 6.5 MB/s (830776 bytes in 0.122s) /product/: 0 files pushed. 357 files skipped. /system/: 7 files pushed. 2638 files s...d. 16.3 MB/s (3785511 bytes in 0.221s) /system_ext/: 1 file pushed. 90 files ...d. 13.2 MB/s (1152016 bytes in 0.084s) /vendor/: 0 files pushed. 200 files skipped. And drop the repeated "files" when talking about how many were skipped for a small saving: /data/: 2 files pushed, 734 skipped. 6.4 MB/s (830776 bytes in 0.124s) /product/: 0 files pushed, 357 skipped. /system/: 7 files pushed, 2638 skipped. 13.8 MB/s (3785511 bytes in 0.262s) /system_ext/: 1 file pushed, 90 skipped. 12.2 MB/s (1152016 bytes in 0.090s) /vendor/: 0 files pushed, 200 skipped. Bug: http://b/131717844 Test: adb sync Change-Id: I9d24df49498211bc2b8dcebcc6d8bd557da214c1
This commit is contained in:
parent
be27975fff
commit
00ff8d7021
|
@ -187,14 +187,13 @@ struct TransferLedger {
|
|||
const char* direction_str = (direction == TransferDirection::push) ? "pushed" : "pulled";
|
||||
std::stringstream ss;
|
||||
if (!name.empty()) {
|
||||
ss << name << ": ";
|
||||
std::string_view display_name(name);
|
||||
char* out = getenv("ANDROID_PRODUCT_OUT");
|
||||
if (out) android::base::ConsumePrefix(&display_name, out);
|
||||
ss << display_name << ": ";
|
||||
}
|
||||
ss << files_transferred << " file" << ((files_transferred == 1) ? "" : "s") << " "
|
||||
<< direction_str << ".";
|
||||
if (files_skipped > 0) {
|
||||
ss << " " << files_skipped << " file" << ((files_skipped == 1) ? "" : "s")
|
||||
<< " skipped.";
|
||||
}
|
||||
<< direction_str << ", " << files_skipped << " skipped.";
|
||||
ss << TransferRate();
|
||||
|
||||
lp.Print(ss.str(), LinePrinter::LineType::INFO);
|
||||
|
|
Loading…
Reference in New Issue