@@ -11,7 +11,6 @@ import 'package:den_api/den_api.dart';
1111import 'package:grinder/grinder.dart' ;
1212import 'package:html/dom.dart' ;
1313import 'package:html/parser.dart' show parse;
14- import 'package:librato/librato.dart' ;
1514import 'package:path/path.dart' as path;
1615import 'package:yaml/yaml.dart' as yaml;
1716
@@ -137,18 +136,15 @@ analyze() {
137136Future buildSdkDocs () async {
138137 delete (docsDir);
139138 log ('building SDK docs' );
140- int sdkDocsGenTime = await _runAsyncTimed (() async {
141- var process = await Process .start (Platform .resolvedExecutable, [
142- 'bin/dartdoc.dart' ,
143- '--output' ,
144- '${docsDir .path }' ,
145- '--sdk-docs' ,
146- '--show-progress'
147- ]);
148- stdout.addStream (process.stdout);
149- stderr.addStream (process.stderr);
150- });
151- return _uploadStats (sdkDocsGenTime);
139+ var process = await Process .start (Platform .resolvedExecutable, [
140+ 'bin/dartdoc.dart' ,
141+ '--output' ,
142+ '${docsDir .path }' ,
143+ '--sdk-docs' ,
144+ '--show-progress'
145+ ]);
146+ stdout.addStream (process.stdout);
147+ stderr.addStream (process.stderr);
152148}
153149
154150@Task ('Validate the SDK doc build.' )
@@ -207,31 +203,6 @@ indexResources() {
207203@Depends (analyze, test, testDartdoc)
208204buildbot () => null ;
209205
210- Future <int > _runAsyncTimed (Future callback ()) async {
211- var stopwatch = new Stopwatch ()..start ();
212- await callback ();
213- stopwatch.stop ();
214- return stopwatch.elapsedMilliseconds;
215- }
216-
217- Future _uploadStats (int sdkDocsGenTime) async {
218- Map env = Platform .environment;
219-
220- if (env.containsKey ('LIBRATO_USER' ) && env.containsKey ('TRAVIS_COMMIT' )) {
221- Librato librato = new Librato .fromEnvVars ();
222- log ('Uploading stats to ${librato .baseUrl }' );
223- LibratoStat sdkDocsGenTimeStat =
224- new LibratoStat ('sdk-docs-gen-time' , sdkDocsGenTime);
225- await librato.postStats ([sdkDocsGenTimeStat]);
226- String commit = env['TRAVIS_COMMIT' ];
227- LibratoLink link = new LibratoLink (
228- 'github' , 'https://github.com/dart-lang/dart-pad/commit/${commit }' );
229- LibratoAnnotation annotation = new LibratoAnnotation (commit,
230- description: 'Commit ${commit }' , links: [link]);
231- return librato.createAnnotation ('build_ui' , annotation);
232- }
233- }
234-
235206// TODO: check http links, check links in <link>
236207// Also TODO: put a guard for infinite link checking
237208@Task ('Check links' )
0 commit comments