From a86771fd6932235dd554f3b5e81cf788a1daaf4f Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 7 Apr 2016 15:05:52 +0200 Subject: mehr benchmark weil send_message langsam erscheint diff --git a/src/feature/tasterank.rs b/src/feature/tasterank.rs index 20146df..7a93506 100644 --- a/src/feature/tasterank.rs +++ b/src/feature/tasterank.rs @@ -34,9 +34,12 @@ impl Feature for Tasterank { (time::precise_time_ns() - start) / 1000000); let mut msg = String::new(); - for (i, rank) in self.ranks.iter().enumerate() { + let mut i = 1; + for r in &self.ranks { msg.push_str(&format!("{}. {}\n", i + 1, rank)); } + println!("(benchm) tasterank before send: {}ms", + (time::precise_time_ns() - start) / 1000000); if let Err(e) = a.send_message(m.chat.id(), msg, None, None, Some(m.message_id), None) { println!("{}", e); } -- cgit v0.10.1