Something went wrong. Try again.
Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455<!doctype html><html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>5000 Writes</title> <script> window.process = { env: { NODE_ENV: 'development' } }; </script> </head>
<body> <div id="root"></div> <script type="module"> import urqlClient from './urqlClient.js'; import * as bench from '/bench.js'; import { makeEntries } from './makeEntries.js'; import { makeTodo, makeWriter, makeBook, makeStore, makeEmployee, } from './entities.js'; import { getAllTodos, addTodos, addWriters, addBooks, addStores, addEmployees, } from './benchmarks.js';
// create entities to be written const thousandTodos = makeEntries(1000, makeTodo); const thousandWriters = makeEntries(1000, makeWriter); const thousandBooks = makeEntries(1000, makeBook); const thousandStores = makeEntries(1000, makeStore); const thousandEmployees = makeEntries(1000, makeEmployee);
const benchmark = async () => { bench.start(); await addTodos(thousandTodos); await addWriters(thousandWriters); await addBooks(thousandBooks); await addStores(thousandStores); await addEmployees(thousandEmployees); bench.stop(); };
benchmark(); </script> </body></html>