| 870 | |
| 871 | |
| 872 | void 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 | |
| 902 | void CStatistics::AddSourceOrigin(unsigned origin) |
no test coverage detected