{"task": {"agent_timeout": 3000, "task": "codegen__prometheus__prometheus-9274", "verifier_timeout": 3000, "instruction": "This is a code generation task. You are expected to write working code that solves the described problem.\n<issue>\n      ## Proposal\nRemote-write should try to make up time faster, by putting more weight on the backlog of un-sent samples.\n\nHere, we first compute a coefficient of 0.1 divided by the sharding tick, which is 10 seconds, or 1/100, then apply this to the number of pending samples:\nhttps://github.com/prometheus/prometheus/blob/e8663a4eacd310f403ebf5ce492494652dd69379/storage/remote/queue_manager.go#L830-L834\nEffectively we target 100 seconds to clear the backlog.\n\nThe point seems to be aluded to here: https://github.com/prometheus/prometheus/issues/6333#issuecomment-555360746\n> I believe the weight of the samples pending within the calculation isn't enough, but again this is just my theory.\n\nhowever the source of this quote is not given.\n\nPersonally I find 100 seconds to be very long.  There are a couple of suggestions in #6333 that it should be \"a few scrapes\" or \"`batch_send_deadline` + 1m\" (65 seconds by default).\n\nI think I would be ok with 30 seconds. I don't really want to make it configurable since hardly anyone will configure it, but I guess that might be the easiest way to find the \"right\" value.\n\n</issue>\nFocus on implementing the required functionality correctly and efficiently. Treat this as a programming challenge.\nYou are not allowed to read git history.\n", "memory": "8192m", "runnable": false, "difficulty": "hard", "language": "", "cpus": "", "instruction_truncated": false, "category": "code-generation", "compose": false, "has_solution": true, "oracle": null, "docker_image": "", "taskset": "devopsgym", "tags": ["code-generation", "devops-bench"]}, "runs": []}