return output path
This commit is contained in:
Родитель
5e9cb6435b
Коммит
c9682b8128
|
@ -5,7 +5,7 @@ Run a promise (perhaps with p-queue) generating a profiler json suitable to be c
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install p-profile
|
$ npm install p-profiler
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -77,8 +77,12 @@ export default class Profiler {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Writes out the profiler.json and returns the output path
|
||||||
|
*/
|
||||||
output() {
|
output() {
|
||||||
return fs.writeFileSync(this.outputPath, JSON.stringify(this.events));
|
fs.writeFileSync(this.outputPath, JSON.stringify(this.events));
|
||||||
|
return this.outputPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче