Comparing version 0.0.2 to 0.0.5
@@ -46,2 +46,3 @@ (function () { | ||
if (angular.isDefined(HeimdallrService.url)) { | ||
heiSvc.updateRum(); | ||
var sent = $http.post('/monitoring/perf', heiSvc.rum, performance.clearMarks("Start:/monitoring/perf")); | ||
@@ -78,2 +79,13 @@ sent.then(callback).finally(function () { | ||
heiSvc.updateRum = function () { | ||
heiSvc.rum = { | ||
_angularVersion: angular.version, | ||
_watcherCount: $rootScope.$$watchersCount, | ||
_customAttributes: {}, | ||
_navigation: performance.timing, | ||
_resources: performance.getEntriesByType('resource'), | ||
_marks: performance.getEntriesByType('mark'), | ||
_measures: performance.getEntriesByType('measure') | ||
} | ||
}; | ||
heiSvc.measure = function (lable, startMark, endMark, remove) { | ||
@@ -179,3 +191,3 @@ try { | ||
$interval(HeimdallrService.sendStats, heiSvc.interval); | ||
$interval(heiSvc.sendStats, heiSvc.interval); | ||
}]); | ||
@@ -182,0 +194,0 @@ |
{ | ||
"name": "heimdallr", | ||
"version": "0.0.2", | ||
"version": "0.0.5", | ||
"description": "Performance monitoring tool for angular based applications", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -10,4 +10,4 @@ #[Heimdallr](https://github.com/zackarychapple/heimdallr) | ||
## Compatibility ## | ||
Angular 1.4.x | ||
Routers: ui.router | ||
* Angular 1.4+ (tested on 1.4.7 & 1.4.8) | ||
* Routers: ui.router | ||
@@ -56,2 +56,16 @@ ## Setup ## | ||
HeimdallrService.measure("SomeTitle", 'event1', 'event2', true); | ||
``` | ||
## Troubleshooting ## | ||
Enabling debug will enable console error messages. | ||
```javascript | ||
myApp.run(['HeimdallrService', function(HeimdallrService){ | ||
HeimdallrService.init({ | ||
debug: true, | ||
url: '/monitoring/perf', | ||
customProperties: { | ||
app: appConstant | ||
} | ||
}); | ||
}]); | ||
``` |
13904
6
255
69