Revert 7693 "Add jmi field for packets discarded due to network error" breaks chromium's webrtc_cases.

TBR=guoweis@webrtc.org

BUG=N/A

Review URL: https://webrtc-codereview.appspot.com/25179004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7706 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrike@webrtc.org 2014-11-14 22:33:13 +00:00
parent be05c74ec8
commit 6a782c2a46
8 changed files with 8 additions and 57 deletions

View File

@ -164,8 +164,6 @@ const char StatsReport::kStatsValueNameRetransmitBitrate[] =
"googRetransmitBitrate";
const char StatsReport::kStatsValueNameRtt[] = "googRtt";
const char StatsReport::kStatsValueNameSsrc[] = "ssrc";
const char StatsReport::kStatsValueNameSendPacketsDiscarded[] =
"packetsDiscardedOnSend";
const char StatsReport::kStatsValueNameTargetEncBitrate[] =
"googTargetEncBitrate";
const char StatsReport::kStatsValueNameTransmitBitrate[] =
@ -888,10 +886,6 @@ void StatsCollector::ExtractSessionInfo() {
channel_iter->connection_infos[i];
report->AddValue(StatsReport::kStatsValueNameBytesSent,
info.sent_total_bytes);
report->AddValue(StatsReport::kStatsValueNameSendPacketsDiscarded,
info.sent_discarded_packets);
report->AddValue(StatsReport::kStatsValueNamePacketsSent,
info.sent_total_packets);
report->AddValue(StatsReport::kStatsValueNameBytesReceived,
info.recv_total_bytes);
report->AddBoolean(StatsReport::kStatsValueNameWritable,

View File

@ -255,7 +255,6 @@ class StatsReport {
static const char kStatsValueNameChannelId[];
static const char kStatsValueNameTrackId[];
static const char kStatsValueNameSsrc[];
static const char kStatsValueNameSendPacketsDiscarded[];
static const char kStatsValueNameTypingNoiseState[];
static const char kStatsValueNameDer[];
static const char kStatsValueNameFingerprint[];

View File

@ -842,8 +842,6 @@ bool P2PTransportChannel::GetStats(ConnectionInfos *infos) {
info.rtt = connection->rtt();
info.sent_total_bytes = connection->sent_total_bytes();
info.sent_bytes_second = connection->sent_bytes_second();
info.sent_discarded_packets = connection->sent_discarded_packets();
info.sent_total_packets = connection->sent_total_packets();
info.recv_total_bytes = connection->recv_total_bytes();
info.recv_bytes_second = connection->recv_bytes_second();
info.local_candidate = connection->local_candidate();

View File

@ -1225,8 +1225,6 @@ TEST_F(P2PTransportChannelTest, GetStats) {
EXPECT_TRUE(infos[0].readable);
EXPECT_TRUE(infos[0].writable);
EXPECT_FALSE(infos[0].timeout);
EXPECT_EQ(10U, infos[0].sent_total_packets);
EXPECT_EQ(0U, infos[0].sent_discarded_packets);
EXPECT_EQ(10 * 36U, infos[0].sent_total_bytes);
EXPECT_EQ(10 * 36U, infos[0].recv_total_bytes);
EXPECT_GT(infos[0].rtt, 0U);

View File

@ -851,28 +851,15 @@ class ConnectionRequest : public StunRequest {
// Connection
//
Connection::Connection(Port* port,
size_t index,
Connection::Connection(Port* port, size_t index,
const Candidate& remote_candidate)
: port_(port),
local_candidate_index_(index),
remote_candidate_(remote_candidate),
read_state_(STATE_READ_INIT),
write_state_(STATE_WRITE_INIT),
connected_(true),
pruned_(false),
use_candidate_attr_(false),
remote_ice_mode_(ICEMODE_FULL),
requests_(port->thread()),
rtt_(DEFAULT_RTT),
last_ping_sent_(0),
last_ping_received_(0),
last_data_received_(0),
last_ping_response_received_(0),
sent_packets_discarded_(0),
sent_packets_total_(0),
reported_(false),
state_(STATE_WAITING) {
: port_(port), local_candidate_index_(index),
remote_candidate_(remote_candidate), read_state_(STATE_READ_INIT),
write_state_(STATE_WRITE_INIT), connected_(true), pruned_(false),
use_candidate_attr_(false), remote_ice_mode_(ICEMODE_FULL),
requests_(port->thread()), rtt_(DEFAULT_RTT), last_ping_sent_(0),
last_ping_received_(0), last_data_received_(0),
last_ping_response_received_(0), reported_(false), state_(STATE_WAITING) {
// All of our connections start in WAITING state.
// TODO(mallinath) - Start connections from STATE_FROZEN.
// Wire up to send stun packets
@ -1361,14 +1348,6 @@ size_t Connection::sent_total_bytes() {
return send_rate_tracker_.total_units();
}
size_t Connection::sent_discarded_packets() {
return sent_packets_discarded_;
}
size_t Connection::sent_total_packets() {
return sent_packets_total_;
}
void Connection::MaybeAddPrflxCandidate(ConnectionRequest* request,
StunMessage* response) {
// RFC 5245
@ -1444,13 +1423,11 @@ int ProxyConnection::Send(const void* data, size_t size,
error_ = EWOULDBLOCK;
return SOCKET_ERROR;
}
sent_packets_total_++;
int sent = port_->SendTo(data, size, remote_candidate_.address(),
options, true);
if (sent <= 0) {
ASSERT(sent < 0);
error_ = port_->GetError();
sent_packets_discarded_++;
} else {
send_rate_tracker_.Update(sent);
}

View File

@ -453,10 +453,6 @@ class Connection : public rtc::MessageHandler,
size_t sent_total_bytes();
size_t sent_bytes_second();
// Used to track how many packets are discarded in the application socket due
// to errors.
size_t sent_discarded_packets();
size_t sent_total_packets();
size_t recv_total_bytes();
size_t recv_bytes_second();
sigslot::signal1<Connection*> SignalStateChange;
@ -583,8 +579,6 @@ class Connection : public rtc::MessageHandler,
rtc::RateTracker recv_rate_tracker_;
rtc::RateTracker send_rate_tracker_;
uint32 sent_packets_discarded_;
uint32 sent_packets_total_;
private:
void MaybeAddPrflxCandidate(ConnectionRequest* request,

View File

@ -272,10 +272,8 @@ int TCPConnection::Send(const void* data, size_t size,
error_ = EWOULDBLOCK;
return SOCKET_ERROR;
}
sent_packets_total_++;
int sent = socket_->Send(data, size, options);
if (sent < 0) {
sent_packets_discarded_++;
error_ = socket_->GetError();
} else {
send_rate_tracker_.Update(sent);

View File

@ -132,8 +132,6 @@ struct ConnectionInfo {
rtt(0),
sent_total_bytes(0),
sent_bytes_second(0),
sent_discarded_packets(0),
sent_total_packets(0),
recv_total_bytes(0),
recv_bytes_second(0),
key(NULL) {}
@ -146,11 +144,6 @@ struct ConnectionInfo {
size_t rtt; // The STUN RTT for this connection.
size_t sent_total_bytes; // Total bytes sent on this connection.
size_t sent_bytes_second; // Bps over the last measurement interval.
size_t sent_discarded_packets; // Number of outgoing packets discarded due to
// socket errors.
size_t sent_total_packets; // Number of total outgoing packets attempted for
// sending.
size_t recv_total_bytes; // Total bytes received on this connection.
size_t recv_bytes_second; // Bps over the last measurement interval.
Candidate local_candidate; // The local candidate for this connection.