MCPcopy Create free account
hub / github.com/amule-project/amule / UpdateStatsTree

Method UpdateStatsTree

src/Statistics.cpp:872–899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

870
871
872void CStatistics::UpdateStatsTree()
873{
874 // get sort orders right
875 s_sessionUpload->ReSortChildren();
876 s_sessionDownload->ReSortChildren();
877 s_clients->ReSortChildren();
878 s_foundSources->ReSortChildren();
879 // TODO: sort OS_Info subtrees.
880
881 s_avgConnections->SetValue(theApp->listensocket->GetAverageConnections());
882
883 // get serverstats
884 // TODO: make these realtime, too
885 uint32 servfail;
886 uint32 servuser;
887 uint32 servfile;
888 uint32 servtuser;
889 uint32 servtfile;
890 float servocc;
891 theApp->serverlist->GetStatus(servfail, servuser, servfile, servtuser, servtfile, servocc);
892 s_workingServers->SetValue((uint64)((*s_totalServers)-servfail));
893 s_failedServers->SetValue((uint64)servfail);
894 s_usersOnWorking->SetValue((uint64)servuser);
895 s_filesOnWorking->SetValue((uint64)servfile);
896 s_totalUsers->SetValue((uint64)servtuser);
897 s_totalFiles->SetValue((uint64)servtfile);
898 s_serverOccupation->SetValue(servocc);
899}
900
901
902void CStatistics::AddSourceOrigin(unsigned origin)

Callers 2

ProcessRequest2Method · 0.80
ShowStatisticsMethod · 0.80

Calls 4

ReSortChildrenMethod · 0.80
GetAverageConnectionsMethod · 0.80
SetValueMethod · 0.45
GetStatusMethod · 0.45

Tested by

no test coverage detected