<commit_before>import * as constants from "../constants";
import { Configurations } from "../common/constants";
import { EventEmitter } from "events";
import { attachAwaitDetach } from "../common/helpers";
import { IProjectDataService } from "../definitions/project";
import {
	IBuildController,
	IBuildArtefactsService,
	IBuildInfoFileService,
	IBuildData,
} from "../definitions/build";
import { IPlatformsDataService } from "../definitions/platform";
import { IAnalyticsService, IFileSystem } from "../common/declarations";
import { IInjector } from "../common/definitions/yok";
import { injector } from "../common/yok";

export class BuildController extends EventEmitter implements IBuildController {
	constructor(
		private $analyticsService: IAnalyticsService,
		private $buildArtefactsService: IBuildArtefactsService,
		private $buildInfoFileService: IBuildInfoFileService,
		private $fs: IFileSystem,
		private $logger: ILogger,
		private $injector: IInjector,
		private $mobileHelper: Mobile.IMobileHelper,
		private $projectDataService: IProjectDataService,
		private $projectChangesService: IProjectChangesService,
		private $prepareController: IPrepareController
	) {
		super();
	}

	private get $platformsDataService(): IPlatformsDataService {
		return this.$injector.resolve("platformsDataService");
	}

	public async prepareAndBuild(buildData: IBuildData): Promise<string> {
		await this.$prepareController.prepare(buildData);
		const result = await this.build(buildData);

		return result;
	}
<commit_msg>fix: import performance from perf_hooks<commit_after>import * as constants from "../constants";
import { Configurations } from "../common/constants";
import { EventEmitter } from "events";
import { attachAwaitDetach } from "../common/helpers";
import { IProjectDataService } from "../definitions/project";
import {
	IBuildController,
	IBuildArtefactsService,
	IBuildInfoFileService,
	IBuildData,
} from "../definitions/build";
import { IPlatformsDataService } from "../definitions/platform";
import { IAnalyticsService, IFileSystem } from "../common/declarations";
import { IInjector } from "../common/definitions/yok";
import { injector } from "../common/yok";
import { performance } from "perf_hooks";

export class BuildController extends EventEmitter implements IBuildController {
	constructor(
		private $analyticsService: IAnalyticsService,
		private $buildArtefactsService: IBuildArtefactsService,
		private $buildInfoFileService: IBuildInfoFileService,
		private $fs: IFileSystem,
		private $logger: ILogger,
		private $injector: IInjector,
		private $mobileHelper: Mobile.IMobileHelper,
		private $projectDataService: IProjectDataService,
		private $projectChangesService: IProjectChangesService,
		private $prepareController: IPrepareController
	) {
		super();
	}

	private get $platformsDataService(): IPlatformsDataService {
		return this.$injector.resolve("platformsDataService");
	}

	public async prepareAndBuild(buildData: IBuildData): Promise<string> {
		await this.$prepareController.prepare(buildData);
		const result = await this.build(buildData);

		return result;
	}

{'fraction_non_alphanumeric': 0.10803858520900321, 'fraction_numerical': 0.0, 'mean_word_length': 5.959731543624161, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3850321', 'n_tokens_mistral': 897, 'n_tokens_neox': 874, 'n_words': 214}