CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-workerpool

Offload tasks to a pool of workers on node.js and in the browser

Overall
score

95%

Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates the engineer's ability to use the workerpool package to create and configure worker pools, retrieve pool statistics, and properly terminate pools. The focus is on correctly using workerpool's API for pool creation with configuration options, accessing pool state information, and managing pool lifecycle.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Pool creation using workerpool.pool()",
      "description": "Uses workerpool.pool() function to create a worker pool instance. This is the fundamental API for creating pools in workerpool.",
      "max_score": 20
    },
    {
      "name": "minWorkers configuration",
      "description": "Correctly passes the minWorkers option when creating the pool to set the minimum number of workers that should be maintained.",
      "max_score": 15
    },
    {
      "name": "maxWorkers configuration",
      "description": "Correctly passes the maxWorkers option when creating the pool to limit the maximum number of workers allowed.",
      "max_score": 15
    },
    {
      "name": "maxQueueSize configuration",
      "description": "Correctly passes the maxQueueSize option when creating the pool to limit the number of tasks that can be queued.",
      "max_score": 10
    },
    {
      "name": "workerType configuration",
      "description": "Correctly passes the workerType option when creating the pool to specify the type of workers ('auto', 'web', 'process', or 'thread').",
      "max_score": 10
    },
    {
      "name": "Stats retrieval",
      "description": "Uses the pool.stats() method to retrieve current statistics from the worker pool, returning the stats object with pool state information.",
      "max_score": 15
    },
    {
      "name": "Pool termination",
      "description": "Uses the pool.terminate() or pool.clear() method to properly shut down the worker pool. Should handle the force parameter correctly and return the promise for async termination.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-workerpool

tile.json