Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: pkg/microlytics/example/simple.dart

Issue 2770573002: Run dartfmt on microlytics package. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/microlytics/lib/channels.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'package:microlytics/channels.dart'; 5 import 'package:microlytics/channels.dart';
6 import 'package:microlytics/io_channels.dart'; 6 import 'package:microlytics/io_channels.dart';
7 import 'package:microlytics/microlytics.dart'; 7 import 'package:microlytics/microlytics.dart';
8 8
9 void main(List<String> arguments) { 9 void main(List<String> arguments) {
10 // Create the channel that will be used to communicate to analytics. 10 // Create the channel that will be used to communicate to analytics.
11 var channel = new RateLimitingBufferedChannel( 11 var channel = new RateLimitingBufferedChannel(new HttpClientChannel(),
12 new HttpClientChannel(), packetsPerSecond: 1.0); 12 packetsPerSecond: 1.0);
13 13
14 if (arguments.length != 1) { 14 if (arguments.length != 1) {
15 print("usage: dart simple.dart GA-Client-ID"); 15 print("usage: dart simple.dart GA-Client-ID");
16 return; 16 return;
17 } 17 }
18 final String clientID = arguments.single; 18 final String clientID = arguments.single;
19 19
20 // Create the logger. 20 // Create the logger.
21 var lg = new AnalyticsLogger(channel, "555", clientID, "test", "1.2"); 21 var lg = new AnalyticsLogger(channel, "555", clientID, "test", "1.2");
22 22
23 // Send some messages. 23 // Send some messages.
24 lg.logAnonymousEvent("hello", "world"); 24 lg.logAnonymousEvent("hello", "world");
25 lg.logAnonymousTiming("loader", "var", 42); 25 lg.logAnonymousTiming("loader", "var", 42);
26 } 26 }
OLDNEW
« no previous file with comments | « no previous file | pkg/microlytics/lib/channels.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698