Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Benchmarks not returning on deno 0.3.4+ #317

Merged
merged 6 commits into from Mar 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions testing/bench_test.ts
Expand Up @@ -19,15 +19,21 @@ test(async function benching() {
bench(async function forAwaitFetchDenolandX10(b) {
b.start();
for (let i = 0; i < 10; i++) {
await fetch("https://deno.land/");
let r = await fetch("https://deno.land/");
await r.text();
}
b.stop();
});

bench(async function promiseAllFetchDenolandX10(b) {
const urls = new Array(10).fill("https://deno.land/");
b.start();
await Promise.all(urls.map((denoland: string) => fetch(denoland)));
await Promise.all(
urls.map(async (denoland: string) => {
let r = await fetch(denoland);
await r.text();
})
);
b.stop();
});

Expand Down
3 changes: 1 addition & 2 deletions testing/test.ts
Expand Up @@ -11,8 +11,7 @@ import "./format_test.ts";
import "./diff_test.ts";
import "./pretty_test.ts";
import "./asserts_test.ts";
// TODO(ry) Re-enable these tests - they are causing the a hang.
// import "./bench_test.ts";
import "./bench_test.ts";

test(function testingAssertEqualActualUncoercable() {
let didThrow = false;
Expand Down