OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #library("chat_stress_client.dart"); | 5 #library("chat_stress_client.dart"); |
6 #import("http.dart"); | 6 #import("http.dart"); |
7 #import("../../client/json/dart_json.dart"); | 7 #import("../../lib/json/json.dart"); |
8 | 8 |
9 | 9 |
10 class ChatStressClient { | 10 class ChatStressClient { |
11 ChatStressClient() : verbose = false, messagesToSend = 100; | 11 ChatStressClient() : verbose = false, messagesToSend = 100; |
12 | 12 |
13 void run() { | 13 void run() { |
14 HTTPClient httpClient; // HTTP client connection factory. | 14 HTTPClient httpClient; // HTTP client connection factory. |
15 String sessionId; // Session id when connected. | 15 String sessionId; // Session id when connected. |
16 int sendMessageCount; // Number of messages sent. | 16 int sendMessageCount; // Number of messages sent. |
17 int messageCount; | 17 int messageCount; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 167 |
168 int messagesToSend; | 168 int messagesToSend; |
169 bool verbose; | 169 bool verbose; |
170 } | 170 } |
171 | 171 |
172 | 172 |
173 void main () { | 173 void main () { |
174 ChatStressClient stresser = new ChatStressClient(); | 174 ChatStressClient stresser = new ChatStressClient(); |
175 stresser.run(); | 175 stresser.run(); |
176 } | 176 } |
OLD | NEW |