CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/web-performance

Web performance patterns — lazy loading, bundle optimization, query optimization, compression, and resource management

81

3.23x
Quality

77%

Does it follow best practices?

Impact

97%

3.23x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

criteria.jsonevals/scenario-2/

{
  "context": "Tests whether the agent proactively applies backend performance best practices when building an order history API. The task says nothing about pagination, N+1 queries, compression, indexes, or connection management -- the agent should apply these patterns on its own.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Customer orders endpoint is paginated",
      "description": "The GET /api/customers/:id/orders endpoint supports pagination (limit/offset, page/limit, or cursor-based). The query includes a LIMIT clause. Returning all orders without any limit is a failure, even though the task did not ask for pagination.",
      "max_score": 20
    },
    {
      "name": "No N+1 queries for order items",
      "description": "Order items are NOT fetched by querying inside a loop (for each order, query its items). Instead, items are loaded using a JOIN with the orders query, or loaded in a single batch query using an IN clause with collected order IDs, or loaded using ORM eager loading. Querying items in a loop is a failure.",
      "max_score": 22
    },
    {
      "name": "Compression middleware enabled",
      "description": "The Express server includes compression middleware (e.g. import compression from 'compression'; app.use(compression())) registered in the middleware stack.",
      "max_score": 16
    },
    {
      "name": "Connection pooling configured",
      "description": "The database connection uses a connection pool (e.g. pg Pool, Knex pool config, Prisma connection pool) rather than creating a new connection per request.",
      "max_score": 10
    },
    {
      "name": "Foreign key indexes on order_id and customer_id",
      "description": "If the agent creates or modifies the schema, indexes are added on order_items.order_id and orders.customer_id. These columns are used in JOINs and WHERE clauses. Not creating indexes is a partial failure.",
      "max_score": 8
    },
    {
      "name": "Graceful shutdown closes database connections",
      "description": "The server handles SIGTERM or SIGINT to close the database pool and HTTP server gracefully, preventing connection leaks.",
      "max_score": 8
    },
    {
      "name": "Pagination metadata in response",
      "description": "The paginated API response includes metadata such as total count, current page, total pages, or next cursor so clients can navigate between pages of results.",
      "max_score": 6
    },
    {
      "name": "Max limit capped",
      "description": "The pagination limit parameter is capped to a reasonable maximum (e.g. 100) so clients cannot request unbounded result sets.",
      "max_score": 5
    },
    {
      "name": "Total computed in SQL or efficiently",
      "description": "The order total is computed efficiently -- either in the SQL query itself (SUM), or computed once from the already-fetched items, NOT by making additional queries per order.",
      "max_score": 5
    }
  ]
}

evals

tile.json