private void torrent_ReportStatsChanged(object sender, StatsEventArgs e) { DownloadedBytes(e.BytesCompleted); chokedBy = e.ChokedBy; totalPeers = e.TotalPeers; queued = e.QueuedRequests; }
public void Update(StatsEventArgs e) { this.Cpu = e.Cpu; this.Memory = e.Memory; this.Players = e.Players; this.PlayingPlayers = e.Players; this.Uptime = e.Uptime; }
public void SetStats(StatsEventArgs e) { if (AudioStats == null) { AudioStats = new AudioStats(e); } else { AudioStats.Update(e); } }
public void StatsEventArgsConstructorTest() { const int wpm = 40; const int errors = 11; const int accuracy = 80; var target = new StatsEventArgs(wpm, errors, accuracy); Assert.AreEqual(wpm, target.WordsPerMinute); Assert.AreEqual(errors, target.Errors); Assert.AreEqual(accuracy, target.Accuracy); }
private void OnStatsReport() { if (Mode == null) { return; } var downloaded = Math.Min(Mode.BlockStrategist.Available * Global.Instance.BlockSize, Data.TotalLength); var totalPeers = Mode.Peers.Count; var chokedBy = Mode.Peers.Count(p => p.Value.AmChoked); var stats = new StatsEventArgs(downloaded, totalPeers, chokedBy, 0); ReportStats?.Invoke(this, stats); }
private Task OnStatsReceived(StatsEventArgs arg) { Console.WriteLine($"Lavalink Uptime {arg.Uptime}."); return(Task.CompletedTask); }
public AudioStats(StatsEventArgs e) { this.Update(e); }
private Task OnStatsReceived(StatsEventArgs arg) { _logger.ConsoleMusicLog($"Lavalink Uptime {arg.Uptime}."); return(Task.CompletedTask); }
private Task OnStatsReceived([NotNull] StatsEventArgs arg) { this._logger.LogDebug($"Lavalink Uptime {arg.Uptime}."); return(Task.CompletedTask); }
private Task OnStatsReceived(StatsEventArgs arg) { _logger.LogInformation($"Lavalink has been up for {arg.Uptime}."); return(Task.CompletedTask); }
private void typingStats_StatsUpdated(object sender, StatsEventArgs obj) { this.Accuracy = string.Concat(obj.Accuracy + "%"); this.Errors = obj.Errors.ToString(CultureInfo.CurrentCulture); this.WordsPerMinute = obj.WordsPerMinute.ToString(CultureInfo.CurrentCulture); }
private Task OnStatsReceived(StatsEventArgs e) { _log.LogTrace("Received Stats from LavaLink"); _audioStatsService.SetStats(e); return(Task.CompletedTask); }
private Task OnStatsReceived(StatsEventArgs arg) => this.LogAsync(new LogMessage(LogSeverity.Info, "Victoria", $"Lavalink Uptime {arg.Uptime}.", null));
private void _torrent_ReportStats(object sender, StatsEventArgs e) { //Console.WriteLine(e.BytesCompleted); //Console.WriteLine(e.TotalPeers); //Console.WriteLine(e.ChokedBy); }
private void TorrentOnReportStats(object sender, StatsEventArgs statsEventArgs) { }
private Task OnStatsReceived(StatsEventArgs arg) { return(Task.CompletedTask); }