Beispiel #1
0
void Router::inspect(management::InfoList& target) const
{
	for (auto iter=_friends.begin(); iter!=_friends.end(); iter++) {
		auto name = iter->first;
		auto connectedIter = _connectedFriends.find(iter->first);
		if (connectedIter != _connectedFriends.end()) {
			target.append(name+'*', *connectedIter->second);
		} else {
			target.append(name) << iter->second.addr << ':' << iter->second.port;
		}
	}
}
Beispiel #2
0
void Client::inspect(management::InfoList& tgt) const
{
	tgt.append("incomingCurrent") << stats->incomingBitrateCurrent.autoScale() << ", " << stats->incomingMessagesCurrent.autoScale();
	tgt.append("outgoingCurrent") << stats->outgoingBitrateCurrent.autoScale() << ", " << stats->outgoingMessagesCurrent.autoScale();
	tgt.append("incomingTotal") << stats->incomingBytes.autoScale() << ", " << stats->incomingMessages.autoScale();
	tgt.append("outgoingTotal") << stats->outgoingBytes.autoScale() << ", " << stats->outgoingMessages.autoScale();
	tgt.append("assetResponseTime") << assetResponseTime;
	tgt.append("bytesAllocated") << bytesAllocated();
	for (auto iter=clientAssets().begin(); iter != clientAssets().end(); iter++) {
		ostringstream name;
		name << '+' << iter->first;
		auto& node = tgt.append(name.str());
		if (auto asset = iter->second->readAsset())
			node << bithorde::Status_Name(asset->status) << ", " << asset->requestIds();
		else
			node << "<stale>";
	}
	for (size_t i=0; i < _assets.size(); i++) {
		if (auto& asset = _assets[i]) {
			ostringstream name;
			name << '-' << i;
			tgt.append(name.str(), *asset);
		}
	}
}
Beispiel #3
0
void SourceAsset::inspect(management::InfoList& target) const
{
	target.append("type") << "SourceAsset";
	target.append("path") << _data->describe();
}