git-svn-id: svn://db.shs.com.ru/pip@755 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -158,15 +158,16 @@ public:
|
||||
}
|
||||
void updatePeerDiag(TileSimple * tl, const PIDiagnostics & diag) {
|
||||
tl->content.clear();
|
||||
PIDiagnostics::State ds = diag.state();
|
||||
tl->content << TileSimple::Row(diag.name() + " diagnostics", CellFormat(PIScreenTypes::Default, PIScreenTypes::Default, PIScreenTypes::Bold));
|
||||
tl->content << TileSimple::Row("Received count: " + PIString::fromNumber(diag.receiveCount()), CellFormat());
|
||||
tl->content << TileSimple::Row("Invalid count: " + PIString::fromNumber(diag.wrongCount()), CellFormat());
|
||||
tl->content << TileSimple::Row("Sended count: " + PIString::fromNumber(diag.sendCount()), CellFormat());
|
||||
tl->content << TileSimple::Row("Immediate Frequency, Hz: " + PIString::fromNumber(diag.immediateFrequency()), CellFormat());
|
||||
tl->content << TileSimple::Row("Integral Frequency, Hz: " + PIString::fromNumber(diag.integralFrequency()), CellFormat());
|
||||
tl->content << TileSimple::Row("Receive speed: " + diag.receiveSpeed(), CellFormat());
|
||||
tl->content << TileSimple::Row("Send speed: " + diag.sendSpeed(), CellFormat());
|
||||
tl->content << TileSimple::Row("Quality: " + PIString::fromNumber((int)diag.quality()), CellFormat());
|
||||
tl->content << TileSimple::Row("Received count: " + PIString::fromNumber(ds.received_packets), CellFormat());
|
||||
tl->content << TileSimple::Row("Invalid count: " + PIString::fromNumber(ds.received_packets_wrong), CellFormat());
|
||||
tl->content << TileSimple::Row("Sended count: " + PIString::fromNumber(ds.sended_packets), CellFormat());
|
||||
tl->content << TileSimple::Row("Immediate Frequency, Hz: " + PIString::fromNumber(ds.immediate_freq), CellFormat());
|
||||
tl->content << TileSimple::Row("Integral Frequency, Hz: " + PIString::fromNumber(ds.integral_freq), CellFormat());
|
||||
tl->content << TileSimple::Row("Receive speed: " + ds.receive_speed, CellFormat());
|
||||
tl->content << TileSimple::Row("Send speed: " + ds.send_speed, CellFormat());
|
||||
tl->content << TileSimple::Row("Quality: " + PIString::fromNumber((int)ds.quality), CellFormat());
|
||||
}
|
||||
void updatePeerInfo() {
|
||||
bool pm = daemon_.lockedPeers();
|
||||
|
||||
@@ -106,9 +106,9 @@ private:
|
||||
<< ft.diagnostic().sendSpeed()
|
||||
<< "(" << PIString::readableSize(ft.bytesFileCur()) << "/" << PIString::readableSize(ft.bytesFileAll()) << ", "
|
||||
<< PIString::readableSize(ft.bytesCur()) << "/" << PIString::readableSize(ft.bytesAll()) << ")"
|
||||
<< "ETA" << (ft.diagnostic().receiveBytesPerSec() > 0 ?
|
||||
<< "ETA" << (ft.diagnostic().state().received_bytes_per_sec > 0 ?
|
||||
PIString::fromNumber(PISystemTime::fromSeconds((ft.bytesAll() - ft.bytesCur()) /
|
||||
ft.diagnostic().receiveBytesPerSec()).toSeconds())
|
||||
ft.diagnostic().state().received_bytes_per_sec).toSeconds())
|
||||
: PIString("unknown"))
|
||||
#ifndef WINDOWS
|
||||
<< Flush
|
||||
|
||||
Reference in New Issue
Block a user