nyc-bookstores/node_modules/cheerio/benchmarks/htmlparser.js

15 lines
348 B
JavaScript
Raw Normal View History

2013-05-27 20:45:59 +00:00
var request = require('request'),
cheerio = require('cheerio');
request('http://yahoo.com', function(err, response, body) {
if (!err && response.statusCode === 200) {
var start = new Date(),
$ = cheerio.load(body),
end = new Date();
console.log('ops took: ' + (end.getTime() - start.getTime()) + ' ms');
}
});