track multiple servers at the same time

Correct AvailabilityStatistics's behavior under special strategies like "LoadBalance", which may switch the server several times in a short period.
This commit is contained in:
icylogic
2016-03-01 21:32:43 +08:00
parent 7914d704d9
commit a99fef37d3
10 changed files with 221 additions and 145 deletions
@@ -36,7 +36,7 @@ namespace Shadowsocks.View
private void LoadConfiguration()
{
var configs = _controller.GetCurrentConfiguration().configs;
_servers = configs.Select(server => server.FriendlyName()).ToList();
_servers = configs.Select(server => server.Identifier()).ToList();
_configuration = _controller.StatisticsConfiguration
?? new StatisticsStrategyConfiguration();
if (_configuration.Calculations == null)
@@ -153,15 +153,5 @@ namespace Shadowsocks.View
{
repeatTimesNum.ReadOnly = !PingCheckBox.Checked;
}
private void bindingConfiguration_CurrentItemChanged(object sender, EventArgs e)
{
Logging.Info("?");
}
private void bindingConfiguration_BindingComplete(object sender, BindingCompleteEventArgs e)
{
Logging.Info("?");
}
}
}