Implement a basic benchmark test, and deprecate derivation.map()/flatMap()

This starts a new workspace at `packages/benchmarks` where future benchmarks
are going to sit. For now, it only contains a basic profile of a `sequence.play()`
setup.

It also removes all uses of `AbstractDerivation.map()/flatMap()` and uses prisms
instead.
This commit is contained in:
Aria Minaei 2022-11-26 15:00:14 +01:00
parent 45b548660c
commit ae8be59366
26 changed files with 37584 additions and 56 deletions

View file

@ -0,0 +1,29 @@
import path from 'path'
import {definedGlobals} from '../../../theatre/devEnv/definedGlobals'
const benchmarksDir = path.join(__dirname, '..')
const port = 8087
const allEnvs = {
'0.5.0': () => {},
}
require('esbuild')
.serve(
{
port,
servedir: path.join(benchmarksDir, 'src'),
},
{
entryPoints: [path.join(benchmarksDir, 'src/index.tsx')],
target: ['firefox88'],
loader: {'.png': 'file', '.glb': 'file', '.svg': 'dataurl'},
bundle: true,
sourcemap: true,
define: definedGlobals,
},
)
.then((server: unknown) => {
console.log('serving', 'http://localhost:' + port)
})