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

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

Issue 515993003: Minimalistic analytics library used by Dart Server and try.dartlang.org (Closed) Base URL: https://github.com/lukechurch/dart-mircolytics.git@master
Patch Set: Address review comments Created 6 years, 3 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:microlytics/channels.dart';
6 import 'package:microlytics/io_channels.dart';
7 import 'package:microlytics/microlytics.dart';
8
9 void main() {
10 // Create the channel that will be used to communicate to analytics.
11 var channel = new RateLimitingBufferedChannel(
12 new HttpClientChannel(),packetsPerSecond: 1.0);
ahe 2014/09/03 08:51:31 Add space before packetsPerSecond.
lukechurch 2014/09/04 12:58:41 Done.
13
14 const String CLIENT_ID = "UA-XXXXXXXX-1"; //Replace this with your client ID
ahe 2014/09/03 08:51:31 In Dart, it is possible to define compile-time con
lukechurch 2014/09/04 12:58:41 Done.
15
16 // Create the logger.
17 var lg = new AnalyticsLogger(channel, "555", CLIENT_ID, "test", "1.2");
18
19 // Send some messages.
20 lg.logAnonymousEvent("hello", "world");
21 lg.logAnonymousTiming("loader", "var", 42);
22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698