I'm currently using a third party directive, and I want to time how long it takes to render something on screen.
console.time('time');
tableservice.setColumns(columns);
var dataView = new DataView();
dataView.setItems(datarows);
$scope.columns = tableservice.getColumns();
$scope.dataView = dataView;
console.timeEnd('time');
This is the code I have for generating for supplying the model, so that it can be displayed onto the view.
I wanted to time how long it would take, and saw that the console.time methods vary way too much, and the times are awful.
Sometimes I get 0.000ms and 1.000ms, which isn't fine grained at all.
What would be the best way for me to test to see how long it takes for something to be rendered on the view?
Edit:
I've tried a lot of timing methods, and they all seem to jump around way too much so I'm assuming that the times are not very accurate.
Is there a better way to test how long it takes for a model to render onto the screen?