2020-12-28 23:08:57 +02:00
|
|
|
/* tslint:disable:no-inferrable-types */
|
|
|
|
import * as path from 'path';
|
|
|
|
import {ConfigClass, ConfigClassBuilder} from 'typeconfig/node';
|
2021-05-13 09:56:36 +02:00
|
|
|
import {ConfigProperty, SubConfigClass} from 'typeconfig/common';
|
|
|
|
import {JobTrigger, JobTriggerType} from '../src/common/entities/job/JobScheduleDTO';
|
|
|
|
import {ServerVideoConfig} from '../src/common/config/private/PrivateConfig';
|
2020-12-28 23:08:57 +02:00
|
|
|
|
|
|
|
|
2021-05-13 09:56:36 +02:00
|
|
|
|
|
|
|
@SubConfigClass()
|
|
|
|
export class BenchmarksConfig {
|
|
|
|
@ConfigProperty()
|
|
|
|
bmScanDirectory: boolean = true;
|
|
|
|
@ConfigProperty()
|
|
|
|
bmSaveDirectory: boolean = true;
|
|
|
|
@ConfigProperty()
|
|
|
|
bmListDirectory: boolean = true;
|
|
|
|
@ConfigProperty()
|
|
|
|
bmListPersons: boolean = true;
|
|
|
|
@ConfigProperty()
|
|
|
|
bmAllSearch: boolean = true;
|
|
|
|
@ConfigProperty()
|
|
|
|
bmAutocomplete: boolean = true;
|
|
|
|
}
|
|
|
|
|
2020-12-28 23:08:57 +02:00
|
|
|
@ConfigClass({
|
|
|
|
configPath: path.join(__dirname, './../bm_config.json'),
|
|
|
|
saveIfNotExist: true,
|
|
|
|
attachDescription: true,
|
|
|
|
enumsAsString: true,
|
|
|
|
softReadonly: true,
|
|
|
|
cli: {
|
2020-12-30 22:13:19 +02:00
|
|
|
prefix: 'bm-config',
|
2020-12-28 23:08:57 +02:00
|
|
|
enable: {
|
|
|
|
configPath: true,
|
|
|
|
attachState: true,
|
|
|
|
attachDescription: true,
|
|
|
|
rewriteCLIConfig: true,
|
|
|
|
rewriteENVConfig: true,
|
|
|
|
enumsAsString: true,
|
|
|
|
saveIfNotExist: true,
|
|
|
|
exitOnConfig: true
|
|
|
|
},
|
|
|
|
defaults: {
|
|
|
|
enabled: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
export class PrivateConfigClass {
|
|
|
|
@ConfigProperty({description: 'Images are loaded from this folder (read permission required)'})
|
2020-12-31 15:26:45 +02:00
|
|
|
path: string = '/app/data/images';
|
2020-12-28 23:08:57 +02:00
|
|
|
@ConfigProperty({description: 'Describe your system setup'})
|
|
|
|
system: string = '';
|
2020-12-30 22:13:19 +02:00
|
|
|
@ConfigProperty({description: 'Number of times to run the benchmark'})
|
|
|
|
RUNS: number = 50;
|
2021-05-13 09:56:36 +02:00
|
|
|
@ConfigProperty({description: 'Enables / disables benchmarks'})
|
|
|
|
Benchmarks: BenchmarksConfig = new BenchmarksConfig();
|
2020-12-28 23:08:57 +02:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export const BMConfig = ConfigClassBuilder.attachInterface(new PrivateConfigClass());
|
|
|
|
BMConfig.loadSync();
|