aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorjan <jan@ruken.pw>2016-04-07 13:05:52 (UTC)
committerjan <jan@ruken.pw>2016-04-07 13:05:52 (UTC)
commita86771fd6932235dd554f3b5e81cf788a1daaf4f (patch)
treeeddd591ee4717a1f72ab164cdae993fc710302d2 /src/feature
parent63e7f23364eef1eadeab49f3feab6480f77e1398 (diff)
mehr benchmark weil send_message langsam erscheint
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/tasterank.rs5
1 files changed, 4 insertions, 1 deletions
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 {
34 (time::precise_time_ns() - start) / 1000000); 34 (time::precise_time_ns() - start) / 1000000);
35 35
36 let mut msg = String::new(); 36 let mut msg = String::new();
37 for (i, rank) in self.ranks.iter().enumerate() { 37 let mut i = 1;
38 for r in &self.ranks {
38 msg.push_str(&format!("{}. {}\n", i + 1, rank)); 39 msg.push_str(&format!("{}. {}\n", i + 1, rank));
39 } 40 }
41 println!("(benchm) tasterank before send: {}ms",
42 (time::precise_time_ns() - start) / 1000000);
40 if let Err(e) = a.send_message(m.chat.id(), msg, None, None, Some(m.message_id), None) { 43 if let Err(e) = a.send_message(m.chat.id(), msg, None, None, Some(m.message_id), None) {
41 println!("{}", e); 44 println!("{}", e);
42 } 45 }