startBenchmark
189 return new Date().getTime() - t0;
190}
191
192export async function startBenchmark(textureFilesize: number = BENCHMARK_FILE_SIZE, t: any = console): Promise<void> {193 let playground: string;
194 while (true) {
195 const desktop = join(os.homedir(), 'desktop');
snowFsRestoreTexture
178 return new Date().getTime() - t0;
179}
180
181export async function snowFsRestoreTexture(repoPath: string, t: any = console): Promise<number> {182 t.log('Restore texture.psd...');
183
184 const repo = await Repository.open(repoPath);
snowFsRmTexture
164 return new Date().getTime() - t0;
165}
166
167export async function snowFsRmTexture(repoPath: string, t: any = console): Promise<number> {168 t.log('Remove texture.psd...');
169
170 const repo = await Repository.open(repoPath);
snowFsAddTexture
143 return new Date().getTime() - t0;
144}
145
146export async function snowFsAddTexture(repoPath: string, textureFilesize: number = BENCHMARK_FILE_SIZE, t: any = console): Promise<number> {147 if (fse.pathExistsSync(repoPath)) {
148 fse.rmdirSync(repoPath, { recursive: true });
149 }
gitRestoreTexture
135 return new Date().getTime() - t0;
136}
137
138async function gitRestoreTexture(repoPath: string, t = console): Promise<number> {139 t.log('Restore texture.psd...');
140
141 const t0 = new Date().getTime();
It is recommended to have documentation comments above, or right inside a function/class declaration. This helps developers, users and even the author understand the purpose of a code snippet or API function in the future.
NOTE: If you want to stop this issue from getting raised on certain constructs (arrow functions, class expressions, methods etc.), consider using the skipdoccoverage option under the analyzers.meta
property in your .deepsource.toml
file.
For example, the following configuration will silence this issue for class expressions and method definitions:
[analyzers.meta]
skip_doc_coverage = ["class-expression", "method-definition"]
function sum(a, b) {
return a + b;
}
/**
* Function to add two numbers
* @param a The first number to add
* @param b The second number to add
* @returns The sum of two numbers
*/
function sum(a, b) {
return a + b;
}