Skip to content

Benchmark requirements #9

@kyliau

Description

@kyliau

Brainstorm general requirements for all benchmarks (this is intended to be a discussion for now, no decision has been made yet).

  1. Build step
    A build step is probably OK, in particular if using open-source toolchains. Many of today's frameworks require or encourage one.
    Rationale: Our options are very limited if we don't allow a build step. Almost all meta frameworks like Next.js, Angular, and Nuxt provide an official way to build their projects, and often it's the only way to optimize & bundle applications built with those frameworks.
    In Grand Prix, the final output of the build is checked into the repository, but we should check in the sources (package.json, script / command to build the project, lock file to pin dependencies) too. We should probably not check in the node_modules, as is currently done in GrandPrix.
    Our options are: source only (build during CI / release), source + output, or output only (what's in the repo is what gets deployed)
    I vote for source + output since checking in the source allows everyone to reproduce the build artifacts locally, and having output in the source control makes it easy to inspect the code we deploy.

  2. Dedicated server for benchmark
    A dedicated server for just one workload is likely not an option.
    Rationale: If each benchmark requires its own server, then we have to maintain and deploy multiple servers. Perhaps one server to host multiple applications is ok? Server runtime is mostly likely gonna be NodeJS, given how ubiquitous it is with popular frameworks. For example, features like incremental static regeneration (ISR), or image optimization at request time in Next.js requires a server.

  3. Third-party API / services
    At least for now, we probably don't want to rely on any third-party services or REST APIs for the benchmarks as this can influence determinism/score in different ways. Benchmarks should be as hermetic as possible, and most if not all dependencies should be under our direct control.

  4. Third-party resources
    As an extension to requirement (3), is it ok to host resources like scripts, images, fonts on third-party origins like CDNs?
    On the one hand, we like to have as much control as possible over the benchmarks. But on the other hand, loading resources from CDNs is more representative of the real world use case, particularly for ubiquitous resources like google fonts, google analytics, twitter snippets, facebook button, etc. It's important to note that some CDNs do more than serving static content. Cloudinary for example optimizes image on the fly, serves the appropriate image based on device screen size, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions