Remove keen code

This hasn’t been running and is horribly out of date.
This commit is contained in:
kpdecker
2015-09-02 11:40:35 -05:00
parent 0aef72cb8e
commit 454d20e3b2
2 changed files with 3 additions and 44 deletions
+1 -2
View File
@@ -29,7 +29,7 @@
"uglify-js": "~2.4"
},
"devDependencies": {
"async": "^0.9.0",
"async": "^1.4.2",
"aws-sdk": "~1.5.0",
"babel-loader": "^5.0.0",
"babel-runtime": "^5.1.10",
@@ -51,7 +51,6 @@
"grunt-webpack": "^1.0.8",
"istanbul": "^0.3.0",
"jison": "~0.3.0",
"keen.io": "0.0.3",
"mocha": "~1.20.0",
"mock-stdin": "^0.3.0",
"mustache": "0.x",
+2 -42
View File
@@ -1,25 +1,12 @@
var _ = require('underscore'),
async = require('async'),
git = require('./util/git'),
Keen = require('keen.io'),
metrics = require('../bench');
module.exports = function(grunt) {
grunt.registerTask('metrics', function() {
var done = this.async(),
execName = grunt.option('name'),
events = {},
projectId = process.env.KEEN_PROJECTID,
writeKey = process.env.KEEN_WRITEKEY,
keen;
if (!execName && projectId && writeKey) {
keen = Keen.configure({
projectId: projectId,
writeKey: writeKey
});
}
events = {};
async.each(_.keys(metrics), function(name, complete) {
if (/^_/.test(name) || (execName && name !== execName)) {
@@ -31,33 +18,6 @@ module.exports = function(grunt) {
complete();
});
},
function() {
if (!keen) {
return done();
}
emit(keen, events, function(err) {
if (err) {
throw err;
}
grunt.log.writeln('Metrics recorded.');
done();
});
});
done);
});
};
function emit(keen, collections, callback) {
git.commitInfo(function(err, info) {
_.each(collections, function(collection) {
_.each(collection, function(event) {
if (info.tagName) {
event.tag = info.tagName;
}
event.sha = info.head;
});
});
keen.addEvents(collections, callback);
});
}