feat(benchpress): add a file reporter

This commit is contained in:
Tobias Bosch
2015-03-06 11:46:33 -08:00
parent 146d731e73
commit f9dcfa3ba5
10 changed files with 217 additions and 2 deletions

View File

@ -210,7 +210,13 @@ class DateWrapper {
static DateTime fromMillis(int ms) {
return new DateTime.fromMillisecondsSinceEpoch(ms);
}
static int toMillis(DateTime date) {
return date.millisecondsSinceEpoch;
}
static DateTime now() {
return new DateTime.now();
}
static toJson(DateTime date) {
return date.toUtc().toIso8601String();
}
}

View File

@ -275,7 +275,13 @@ export class DateWrapper {
static fromMillis(ms) {
return new Date(ms);
}
static toMillis(date:Date) {
return date.getTime();
}
static now() {
return new Date();
}
static toJson(date) {
return date.toJSON();
}
}