提交 f4a09e5e 编写于 作者: J Johannes Rieken

don't use Buffer in /common/

上级 2ffbf2fc
......@@ -154,9 +154,13 @@ export class ExtensionHostProcessManager extends Disposable {
private async _measureUp(proxy: ExtHostExtensionServiceShape): Promise<number> {
const SIZE = 10 * 1024 * 1024; // 10MB
let b = Buffer.alloc(SIZE, Math.random() % 256);
let buff = VSBuffer.alloc(SIZE);
let value = Math.ceil(Math.random() * 256);
for (let i = 0; i < buff.byteLength; i++) {
buff.writeUInt8(i, value);
}
const sw = StopWatch.create(true);
await proxy.$test_up(VSBuffer.wrap(b));
await proxy.$test_up(buff);
sw.stop();
return ExtensionHostProcessManager._convert(SIZE, sw.elapsed());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册