Skip to content

Commit

Permalink
remove the use of the librato package
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew committed Jun 22, 2016
1 parent efc8723 commit d1dc60d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 48 deletions.
12 changes: 3 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
version: "1.8.0"
contrast:
description:
name: contrast
Expand Down Expand Up @@ -127,12 +127,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.1"
librato:
description:
name: librato
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.3"
logging:
description:
name: logging
Expand Down Expand Up @@ -288,7 +282,7 @@ packages:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.13+1"
version: "0.12.14"
typed_data:
description:
name: typed_data
Expand Down Expand Up @@ -343,4 +337,4 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.8"
sdk: ">=1.14.0 <1.18.0"
sdk: ">=1.14.0 <1.19.0"
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dev_dependencies:
den_api: ^0.1.0
grinder: ^0.8.0
http: ^0.11.0
librato: ^0.0.3
pub_semver: ^1.0.0
test: ^0.12.0
which: ^0.1.3
Expand Down
47 changes: 9 additions & 38 deletions tool/grind.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:den_api/den_api.dart';
import 'package:grinder/grinder.dart';
import 'package:html/dom.dart';
import 'package:html/parser.dart' show parse;
import 'package:librato/librato.dart';
import 'package:path/path.dart' as path;
import 'package:yaml/yaml.dart' as yaml;

Expand Down Expand Up @@ -137,18 +136,15 @@ analyze() {
Future buildSdkDocs() async {
delete(docsDir);
log('building SDK docs');
int sdkDocsGenTime = await _runAsyncTimed(() async {
var process = await Process.start(Platform.resolvedExecutable, [
'bin/dartdoc.dart',
'--output',
'${docsDir.path}',
'--sdk-docs',
'--show-progress'
]);
stdout.addStream(process.stdout);
stderr.addStream(process.stderr);
});
return _uploadStats(sdkDocsGenTime);
var process = await Process.start(Platform.resolvedExecutable, [
'bin/dartdoc.dart',
'--output',
'${docsDir.path}',
'--sdk-docs',
'--show-progress'
]);
stdout.addStream(process.stdout);
stderr.addStream(process.stderr);
}

@Task('Validate the SDK doc build.')
Expand Down Expand Up @@ -207,31 +203,6 @@ indexResources() {
@Depends(analyze, test, testDartdoc)
buildbot() => null;

Future<int> _runAsyncTimed(Future callback()) async {
var stopwatch = new Stopwatch()..start();
await callback();
stopwatch.stop();
return stopwatch.elapsedMilliseconds;
}

Future _uploadStats(int sdkDocsGenTime) async {
Map env = Platform.environment;

if (env.containsKey('LIBRATO_USER') && env.containsKey('TRAVIS_COMMIT')) {
Librato librato = new Librato.fromEnvVars();
log('Uploading stats to ${librato.baseUrl}');
LibratoStat sdkDocsGenTimeStat =
new LibratoStat('sdk-docs-gen-time', sdkDocsGenTime);
await librato.postStats([sdkDocsGenTimeStat]);
String commit = env['TRAVIS_COMMIT'];
LibratoLink link = new LibratoLink(
'github', 'https://github.com/dart-lang/dart-pad/commit/${commit}');
LibratoAnnotation annotation = new LibratoAnnotation(commit,
description: 'Commit ${commit}', links: [link]);
return librato.createAnnotation('build_ui', annotation);
}
}

// TODO: check http links, check links in <link>
// Also TODO: put a guard for infinite link checking
@Task('Check links')
Expand Down

0 comments on commit d1dc60d

Please sign in to comment.