mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-01 11:25:01 +03:00
feat: add skill execution time in check script
This commit is contained in:
parent
4d2fb56109
commit
b7d496e6d6
@ -169,10 +169,12 @@ export default () =>
|
||||
*/
|
||||
|
||||
try {
|
||||
LogHelper.time('Skill execution time')
|
||||
const p = await command(
|
||||
'pipenv run python bridges/python/main.py scripts/assets/intent-object.json',
|
||||
{ shell: true }
|
||||
)
|
||||
LogHelper.timeEnd('Skill execution time')
|
||||
LogHelper.info(p.command)
|
||||
LogHelper.success(`${p.stdout}\n`)
|
||||
} catch (e) {
|
||||
|
@ -72,4 +72,18 @@ export class LogHelper {
|
||||
public static default(value: string): void {
|
||||
console.log(value)
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a log timer
|
||||
*/
|
||||
public static time(value: string): void {
|
||||
console.time(`🕑 \x1b[36m${value}\x1b[0m`)
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop log timer
|
||||
*/
|
||||
public static timeEnd(value: string): void {
|
||||
console.timeEnd(`🕑 \x1b[36m${value}\x1b[0m`)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user