Skip to content

Commit

Permalink
build: enable tslint for "benchmark" package
Browse files Browse the repository at this point in the history
  • Loading branch information
bajtos committed Aug 24, 2018
1 parent 2a5a7ea commit 0fc1e93
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 1 addition & 7 deletions benchmark/src/benchmark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ export type AutocannonFactory = (url: string) => Autocannon;

export class Benchmark {
private options: Options;
private worker: ChildProcess;
private url: string;

// Customization points
public cannonFactory: AutocannonFactory;
Expand Down Expand Up @@ -81,7 +79,7 @@ export class Benchmark {
const result = await runner.execute(autocannon);
debug('Stats: %j', result);

closeWorker(worker);
await closeWorker(worker);
debug('Worker stopped, done.');

this.logger(name, result);
Expand Down Expand Up @@ -115,7 +113,3 @@ async function closeWorker(worker: ChildProcess) {
worker.kill();
await pEvent(worker, 'close');
}

function sleep(ms: number) {
return new Promise(resolve => setTimeout(resolve, ms));
}
6 changes: 1 addition & 5 deletions benchmark/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {
TodoListApplication,
TodoRepository,
Route,
} from '@loopback/example-todo';
import {TodoListApplication} from '@loopback/example-todo';

async function main() {
const app = new TodoListApplication({
Expand Down
14 changes: 12 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"extends": "./packages/build/config/tsconfig.common.json",
"include": ["packages", "examples"],
"exclude": ["node_modules/**", "packages/*/node_modules/**", "examples/*/node_modules/**", "**/*.d.ts"]
"include": [
"benchmark",
"examples",
"packages"
],
"exclude": [
"node_modules/**",
"benchmark/node_modules/**",
"examples/*/node_modules/**",
"packages/*/node_modules/**",
"**/*.d.ts"
]
}

0 comments on commit 0fc1e93

Please sign in to comment.