encapsulate deferred writing in WriteBuffer class

This commit is contained in:
Jörg Breitbart
2019-09-13 16:31:28 +02:00
parent e402772cf7
commit c2ec16a16c
5 changed files with 127 additions and 96 deletions
+4 -4
View File
@@ -49,8 +49,8 @@ perfContext('Terminal: ls -lR /usr/lib', () => {
before(() => {
terminal = new Terminal({cols: 80, rows: 25, scrollback: 1000});
});
new ThroughputRuntimeCase('', async () => {
await new Promise(resolve => terminal.write(content, resolve));
new ThroughputRuntimeCase('', () => {
terminal.writeSync(content);
return {payloadSize: contentUtf8.length};
}, {fork: false}).showAverageThroughput();
});
@@ -60,8 +60,8 @@ perfContext('Terminal: ls -lR /usr/lib', () => {
before(() => {
terminal = new Terminal({cols: 80, rows: 25, scrollback: 1000});
});
new ThroughputRuntimeCase('', async () => {
await new Promise(resolve => terminal.write(content, resolve));
new ThroughputRuntimeCase('', () => {
terminal.writeSync(content);
return {payloadSize: contentUtf8.length};
}, {fork: false}).showAverageThroughput();
});