Skip to content

Commit

Permalink
v0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
goenning committed Nov 1, 2019
1 parent 0fe1a7c commit f1599a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rendergun",
"version": "0.8.0",
"version": "0.8.1",
"description": "A pre-render service for client-side rendered websites",
"repository": "https://github.com/goenning/rendergun",
"main": "dist/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default class Renderer {
}

public async render(url: string, opts: RenderOptions = {}): Promise<RenderResult> {
const startTime = Date.now();
this.logger(`Starting rendering process of '${url}'.`);
this.recentRequests++;
this.activeRequests++;
Expand Down Expand Up @@ -146,6 +147,8 @@ export default class Renderer {
}
throw err;
} finally {
const elapsedTime = Date.now() - startTime;
this.logger(`Finished rendering process of '${url}'. Took ${elapsedTime}ms.`);
this.activeRequests--;
await page.close();
await browser.disconnect();
Expand Down

0 comments on commit f1599a6

Please sign in to comment.