Improve debugging
This commit is contained in:
parent
abba023c20
commit
ff5b987688
2 changed files with 11 additions and 1 deletions
|
|
@ -70,6 +70,9 @@ export class MockClient implements FileSystemOperations {
|
|||
if (this.localFiles.has(path)) {
|
||||
throw new Error(`File ${path} already exists`);
|
||||
}
|
||||
this.client.logger.info(
|
||||
`Creating file ${path} with content ${new TextDecoder().decode(newContent)}`
|
||||
);
|
||||
this.localFiles.set(path, newContent);
|
||||
void this.client.syncer.syncLocallyCreatedFile(path, new Date());
|
||||
}
|
||||
|
|
@ -117,6 +120,9 @@ export class MockClient implements FileSystemOperations {
|
|||
}
|
||||
|
||||
public async delete(path: RelativePath): Promise<void> {
|
||||
this.client.logger.info(
|
||||
`Deleting file: ${path} with:\n content ${new TextDecoder().decode(this.localFiles.get(path))}`
|
||||
);
|
||||
this.localFiles.delete(path);
|
||||
void this.client.syncer.syncLocallyDeletedFile(path);
|
||||
}
|
||||
|
|
@ -134,6 +140,10 @@ export class MockClient implements FileSystemOperations {
|
|||
this.localFiles.delete(oldPath);
|
||||
}
|
||||
|
||||
this.client.logger.info(
|
||||
`Renamed file: ${oldPath} -> ${newPath} with:\n content ${new TextDecoder().decode(file)}`
|
||||
);
|
||||
|
||||
void this.client.syncer.syncLocallyUpdatedFile({
|
||||
oldPath,
|
||||
relativePath: newPath,
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ async function runTest({
|
|||
async function runTests(): Promise<void> {
|
||||
const agentCounts = [2, 10];
|
||||
const concurrencies = [1, 16];
|
||||
const iterations = [300];
|
||||
const iterations = [50, 300];
|
||||
const doDeletes = [false, true];
|
||||
|
||||
for (const agentCount of agentCounts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue