{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6107,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":3878,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":4156,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4145,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":7343,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4669,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4791,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3940,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4615,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":3890,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5295,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4701,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5181,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4506,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4018,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3817,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":4151,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":5342,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4965,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4058,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":4715,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":5606,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3898,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5179,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5232,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5878,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4104,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3730,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":4720,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":4697,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5502,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4465,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":4542,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5433,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4224,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":3989,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4584,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Low)","model_name_or_path":"Gemini 3.5 Flash (Low)","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":4393,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4656,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":5264,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6616,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4645,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"(from log; body not captured)","model_patch":"(from log; body not captured)"}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":7416,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal angle_zero = angle_zero\n```\nReason: Localizing the globally pre-allocated `angle_zero` constant avoids both the garbage collection overhead of allocating new Angle objects and the global table lookup overhead in hot paths.","model_patch":"```lua\nlocal angle_zero = angle_zero\n```\nReason: Localizing the globally pre-allocated `angle_zero` constant avoids both the garbage collection overhead of allocating new Angle objects and the global table lookup overhead in hot paths."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5782,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal config_color = Color(255, 0, 0)\nlocal val = config_color\n```\nReason: Local variables are stored in virtual machine registers and accessed directly by index, completely bypassing the multiple expensive hash table lookups required to resolve nested tables.","model_patch":"```lua\nlocal config_color = Color(255, 0, 0)\nlocal val = config_color\n```\nReason: Local variables are stored in virtual machine registers and accessed directly by index, completely bypassing the multiple expensive hash table lookups required to resolve nested tables."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6296,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system via `getDarkRPVar` which is more efficient than standard NWVars and correctly retrieves custom job names set by players using the `/job` command.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system via `getDarkRPVar` which is more efficient than standard NWVars and correctly retrieves custom job names set by players using the `/job` command."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5193,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal threshold = 100\nif vec1:DistToSqr(vec2) < (threshold * threshold) then\n    -- Vectors are within the threshold distance\nend\n```\nReason: Using Vector:DistToSqr avoids the computationally expensive square root operation performed by Vector:Distance.","model_patch":"```lua\nlocal threshold = 100\nif vec1:DistToSqr(vec2) < (threshold * threshold) then\n    -- Vectors are within the threshold distance\nend\n```\nReason: Using Vector:DistToSqr avoids the computationally expensive square root operation performed by Vector:Distance."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":25349,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ipairs(ents.Iterator()) do\n    -- Code to execute on each entity\nend\n```\nReason: ents.Iterator() is preferred over ents.GetAll() because it returns a read-only reference to the internal entity table, avoiding the CPU and memory overhead of creating a new table on every call.","model_patch":"```lua\nfor _, ent in ipairs(ents.Iterator()) do\n    -- Code to execute on each entity\nend\n```\nReason: ents.Iterator() is preferred over ents.GetAll() because it returns a read-only reference to the internal entity table, avoiding the CPU and memory overhead of creating a new table on every call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6006,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ply = Entity(1) -- Example player reference\nlocal nearbyEnts = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: ents.FindInSphere is implemented in C++ and utilizes the Source Engine's spatial partitioning tree to quickly query entities within a radial distance, making it significantly faster than checking distances manually or using more complex FindIn* shapes.","model_patch":"```lua\nlocal ply = Entity(1) -- Example player reference\nlocal nearbyEnts = ents.FindInSphere(ply:GetPos(), 512)\n```\nReason: ents.FindInSphere is implemented in C++ and utilizes the Source Engine's spatial partitioning tree to quickly query entities within a radial distance, making it significantly faster than checking distances manually or using more complex FindIn* shapes."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6566,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n\tlocal players = {}\n\tlocal count = 0\n\tlocal radiusSqr = radius * radius\n\n\tfor _, ply in player.Iterator() do\n\t\tif ply:GetPos():DistToSqr(pos) <= radiusSqr then\n\t\t\tcount = count + 1\n\t\t\tplayers[count] = ply\n\t\tend\n\tend\n\n\treturn players\nend\n```\nReason: Iterating over players with `player.Iterator()` avoids allocating tables, and checking distance using `DistToSqr` avoids expensive square root calculations while bypassing `ents.FindInSphere`'s costly spatial partitioning search over thousands of server entities.","model_patch":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n\tlocal players = {}\n\tlocal count = 0\n\tlocal radiusSqr = radius * radius\n\n\tfor _, ply in player.Iterator() do\n\t\tif ply:GetPos():DistToSqr(pos) <= radiusSqr then\n\t\t\tcount = count + 1\n\t\t\tplayers[count] = ply\n\t\tend\n\tend\n\n\treturn players\nend\n```\nReason: Iterating over players with `player.Iterator()` avoids allocating tables, and checking distance using `DistToSqr` avoids expensive square root calculations while bypassing `ents.FindInSphere`'s costly spatial partitioning search over thousands of server entities."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5258,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric for loops are optimized at the Lua VM level, using dedicated bytecode instructions and register allocations for the counter, increment, and comparison instead of manual arithmetic and conditional evaluations.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric for loops are optimized at the Lua VM level, using dedicated bytecode instructions and register allocations for the counter, increment, and comparison instead of manual arithmetic and conditional evaluations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6414,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- FASTER: Calling hook.Run once with all players\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    hook.Run(\"OnPlayersTick\", player.GetAll())\nend)\n\n-- SLOWER: Looping players and calling hook.Run per player\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    local players = player.GetAll()\n    for i = 1, #players do\n        hook.Run(\"OnPlayerTick\", players[i])\n    end\nend)\n```\nReason: Calling hook.Run once per tick incurs the overhead of hook lookup and execution only once, whereas calling it per-player multiplies that lookup and call overhead by the player count.","model_patch":"```lua\n-- FASTER: Calling hook.Run once with all players\nhook.Add(\"Tick\", \"NotifyPlayersFast\", function()\n    hook.Run(\"OnPlayersTick\", player.GetAll())\nend)\n\n-- SLOWER: Looping players and calling hook.Run per player\nhook.Add(\"Tick\", \"NotifyPlayersSlow\", function()\n    local players = player.GetAll()\n    for i = 1, #players do\n        hook.Run(\"OnPlayerTick\", players[i])\n    end\nend)\n```\nReason: Calling hook.Run once per tick incurs the overhead of hook lookup and execution only once, whereas calling it per-player multiplies that lookup and call overhead by the player count."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":6089,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ply\nhook.Add(\"HUDPaint\", \"OptimizedHealthHUD\", function()\n\tply = IsValid(ply) and ply or LocalPlayer()\n\tif not IsValid(ply) then return end\n\n\tlocal hp = ply:Health()\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 50, color_white)\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 70, color_white)\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 90, color_white)\nend)\n```\nReason: Caching the LocalPlayer entity to a local variable and storing the result of `:Health()` once per frame avoids repeating expensive Lua-to-C boundary crossings and table lookups.","model_patch":"```lua\nlocal ply\nhook.Add(\"HUDPaint\", \"OptimizedHealthHUD\", function()\n\tply = IsValid(ply) and ply or LocalPlayer()\n\tif not IsValid(ply) then return end\n\n\tlocal hp = ply:Health()\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 50, color_white)\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 70, color_white)\n\tdraw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 90, color_white)\nend)\n```\nReason: Caching the LocalPlayer entity to a local variable and storing the result of `:Health()` once per frame avoids repeating expensive Lua-to-C boundary crossings and table lookups."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5910,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal colorWhite = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"PaintHook\", function()\n    -- Use colorWhite instead of calling Color(255, 255, 255)\nend)\n```\nReason: Calling the Color function creates a new table on every frame, generating garbage and causing garbage collection overhead, whereas caching the color table outside the loop references a single persistent instance.","model_patch":"```lua\nlocal colorWhite = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"PaintHook\", function()\n    -- Use colorWhite instead of calling Color(255, 255, 255)\nend)\n```\nReason: Calling the Color function creates a new table on every frame, generating garbage and causing garbage collection overhead, whereas caching the color table outside the loop references a single persistent instance."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5003,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\n\n-- Inside the hot loop:\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Localizing the global function caches its reference, replacing slow table lookups (looking up `math` in the globals table, then `sin` in the `math` table) with fast local register access.","model_patch":"```lua\nlocal sin = math.sin\n\n-- Inside the hot loop:\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Localizing the global function caches its reference, replacing slow table lookups (looking up `math` in the globals table, then `sin` in the `math` table) with fast local register access."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":5916,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal lp\nlocal function GetLocalPlayerSafe()\n\tif not lp or not lp:IsValid() then\n\t\tlp = LocalPlayer()\n\tend\n\treturn lp\nend\n```\nReason: Caching the player object in a local variable avoids repeated expensive global table lookups and engine calls to LocalPlayer() while ensuring the entity has loaded and is valid.","model_patch":"```lua\nlocal lp\nlocal function GetLocalPlayerSafe()\n\tif not lp or not lp:IsValid() then\n\t\tlp = LocalPlayer()\n\tend\n\treturn lp\nend\n```\nReason: Caching the player object in a local variable avoids repeated expensive global table lookups and engine calls to LocalPlayer() while ensuring the entity has loaded and is valid."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":7856,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.7 -- Approximately 45 degrees tolerance (cos(45) ≈ 0.707)\n    local dir = ply2:GetShootPos() - ply1:GetShootPos()\n    dir:Normalize() -- Normalizes the vector in-place, which is faster and avoids new allocations\n    return ply1:GetAimVector():Dot(dir) > threshold and ply2:GetAimVector():Dot(dir) < -threshold\nend\n```\nReason: The dot product of the unit aim vectors against the normalized direction vector between players determines alignment using basic arithmetic (multiplications and additions), avoiding expensive trigonometric function calls like math.acos.","model_patch":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.7 -- Approximately 45 degrees tolerance (cos(45) ≈ 0.707)\n    local dir = ply2:GetShootPos() - ply1:GetShootPos()\n    dir:Normalize() -- Normalizes the vector in-place, which is faster and avoids new allocations\n    return ply1:GetAimVector():Dot(dir) > threshold and ply2:GetAimVector():Dot(dir) < -threshold\nend\n```\nReason: The dot product of the unit aim vectors against the normalized direction vector between players determines alignment using basic arithmetic (multiplications and additions), avoiding expensive trigonometric function calls like math.acos."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5695,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: The colon syntax `ply:SomeHelper()` is syntactic sugar for `ply.SomeHelper(ply)`, which requires a table/metatable lookup on the player object and is slower than a direct function call.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: The colon syntax `ply:SomeHelper()` is syntactic sugar for `ply.SomeHelper(ply)`, which requires a table/metatable lookup on the player object and is slower than a direct function call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5901,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nMsgN(\"Debug message\")\n```\nReason: MsgN is a direct C-implemented engine function that bypasses the Lua-side overhead of print, which converts all arguments to strings and concatenates them with tabs before printing.","model_patch":"```lua\nMsgN(\"Debug message\")\n```\nReason: MsgN is a direct C-implemented engine function that bypasses the Lua-side overhead of print, which converts all arguments to strings and concatenates them with tabs before printing."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5045,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops avoid the iterator function overhead of ipairs and pairs, mapping directly to highly optimized bytecode instructions in Garry's Mod's LuaJIT environment.","model_patch":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops avoid the iterator function overhead of ipairs and pairs, mapping directly to highly optimized bytecode instructions in Garry's Mod's LuaJIT environment."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6274,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal results = {}\nlocal count = 0\nfor i = 1, #inputList do\n    local val = inputList[i]\n    if val > 10 then -- Filter\n        count = count + 1\n        results[count] = val * 2 -- Map\n    end\nend\n```\nReason: A direct procedural loop executes in a single pass, avoiding the high CPU overhead of nested closures, function calls, and intermediate table allocations generated by the DarkRP fn library.","model_patch":"```lua\nlocal results = {}\nlocal count = 0\nfor i = 1, #inputList do\n    local val = inputList[i]\n    if val > 10 then -- Filter\n        count = count + 1\n        results[count] = val * 2 -- Map\n    end\nend\n```\nReason: A direct procedural loop executes in a single pass, avoiding the high CPU overhead of nested closures, function calls, and intermediate table allocations generated by the DarkRP fn library."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5946,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function updatePlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"UpdatePlayerCacheOnSpawn\", function()\n    timer.Simple(0, updatePlayerCache)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UpdatePlayerCacheOnDisconnect\", function()\n    timer.Simple(0, updatePlayerCache)\nend)\n\nhook.Add(\"Think\", \"OptimizedThinkHook\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Perform your tick operations here\n        end\n    end\nend)\n```\nReason: Calling player.GetAll() every tick creates a new table each time, causing high garbage collection overhead and CPU strain, whereas caching the table and updating it only on PlayerInitialSpawn and PlayerDisconnected hooks eliminates unnecessary allocations.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function updatePlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"UpdatePlayerCacheOnSpawn\", function()\n    timer.Simple(0, updatePlayerCache)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UpdatePlayerCacheOnDisconnect\", function()\n    timer.Simple(0, updatePlayerCache)\nend)\n\nhook.Add(\"Think\", \"OptimizedThinkHook\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        if IsValid(ply) then\n            -- Perform your tick operations here\n        end\n    end\nend)\n```\nReason: Calling player.GetAll() every tick creates a new table each time, causing high garbage collection overhead and CPU strain, whereas caching the table and updating it only on PlayerInitialSpawn and PlayerDisconnected hooks eliminates unnecessary allocations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8368,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal playerData = {}\n\n-- Writing data\nplayerData[ply] = value\n\n-- Reading data (fast hot-path)\nlocal value = playerData[ply]\n\n-- Clean up on disconnect to prevent memory leaks\nhook.Add(\"PlayerDisconnected\", \"CleanPlayerDataCache\", function(ply)\n    playerData[ply] = nil\nend)\n```\nReason: Reading `ply.someField` invokes a metatable lookup on the player userdata to search the entity's table, whereas indexing a local Lua table directly with the player object bypasses the metatable lookup and C-boundary entirely.","model_patch":"```lua\nlocal playerData = {}\n\n-- Writing data\nplayerData[ply] = value\n\n-- Reading data (fast hot-path)\nlocal value = playerData[ply]\n\n-- Clean up on disconnect to prevent memory leaks\nhook.Add(\"PlayerDisconnected\", \"CleanPlayerDataCache\", function(ply)\n    playerData[ply] = nil\nend)\n```\nReason: Reading `ply.someField` invokes a metatable lookup on the player userdata to search the entity's table, whereas indexing a local Lua table directly with the player object bypasses the metatable lookup and C-boundary entirely."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":5699,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal tbl = { \"value1\", \"value2\", \"value3\" }\n```\nReason: Sequential number-indexed arrays store values in the table's continuous array portion, allowing LuaJIT to optimize iteration using a numeric for loop with direct array offsets instead of costly hash table lookups.","model_patch":"```lua\nlocal tbl = { \"value1\", \"value2\", \"value3\" }\n```\nReason: Sequential number-indexed arrays store values in the table's continuous array portion, allowing LuaJIT to optimize iteration using a numeric for loop with direct array offsets instead of costly hash table lookups."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4725,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate r, g, b, a numbers directly is faster because it avoids the overhead of creating, wrapping, or indexing a Color table object, preventing unnecessary garbage collection inside hot rendering hooks.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate r, g, b, a numbers directly is faster because it avoids the overhead of creating, wrapping, or indexing a Color table object, preventing unnecessary garbage collection inside hot rendering hooks."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5315,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:1:12345';\")\n```\nReason: Local SQLite runs in-process directly on the server's local disk, eliminating the network transmission and TCP overhead associated with querying a remote MySQL server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:1:12345';\")\n```\nReason: Local SQLite runs in-process directly on the server's local disk, eliminating the network transmission and TCP overhead associated with querying a remote MySQL server."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6217,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal Player = FindMetaTable(\"Player\")\nlocal origSteamID = Player.SteamID\n\nfunction Player:SteamID()\n    local steamID = self._cachedSteamID\n    if not steamID then\n        steamID = origSteamID(self)\n        self._cachedSteamID = steamID\n    end\n    return steamID\nend\n```\nReason: Overriding the Player metatable method to memoize the SteamID string directly on the player object avoids the overhead of repeatedly calling the engine-level C-function.","model_patch":"```lua\nlocal Player = FindMetaTable(\"Player\")\nlocal origSteamID = Player.SteamID\n\nfunction Player:SteamID()\n    local steamID = self._cachedSteamID\n    if not steamID then\n        steamID = origSteamID(self)\n        self._cachedSteamID = steamID\n    end\n    return steamID\nend\n```\nReason: Overriding the Player metatable method to memoize the SteamID string directly on the player object avoids the overhead of repeatedly calling the engine-level C-function."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":5344,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\"\nend\nlocal result = table.concat(pieces)\n```\nReason: Using `table.concat` accumulates the strings in a table and combines them in a single operation, avoiding the performance overhead of creating and garbage-collecting thousands of intermediate strings.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece\"\nend\nlocal result = table.concat(pieces)\n```\nReason: Using `table.concat` accumulates the strings in a table and combines them in a single operation, avoiding the performance overhead of creating and garbage-collecting thousands of intermediate strings."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5224,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(color.r, color.g, color.b, color.a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: surface.DrawRect is a low-level engine-facing function that bypasses the overhead of the draw.RoundedBox Lua wrapper, which performs parameter checks and handles rounded corner geometry calculations.","model_patch":"```lua\nsurface.SetDrawColor(color.r, color.g, color.b, color.a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: surface.DrawRect is a low-level engine-facing function that bypasses the overhead of the draw.RoundedBox Lua wrapper, which performs parameter checks and handles rounded corner geometry calculations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6737,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: Low-level `surface` functions are direct C++ bindings, whereas `draw.*` helpers are Lua wrapper functions that introduce overhead by parsing arguments, handling alignment calculations, and splitting strings.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(text)\n```\nReason: Low-level `surface` functions are direct C++ bindings, whereas `draw.*` helpers are Lua wrapper functions that introduce overhead by parsing arguments, handling alignment calculations, and splitting strings."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5103,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal tbl = { \"one\", \"two\", \"three\" }\nlocal length = #tbl\n```\nReason: The `#` operator is the built-in, most efficient, and preferred way to get the length of a sequential, one-indexed array-like table in Garry's Mod Lua.","model_patch":"```lua\nlocal tbl = { \"one\", \"two\", \"three\" }\nlocal length = #tbl\n```\nReason: The `#` operator is the built-in, most efficient, and preferred way to get the length of a sequential, one-indexed array-like table in Garry's Mod Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6431,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nt = {}\n```\nReason: Creating a new table with `t = {}` is an O(1) operation, whereas `table.Empty(t)` runs an O(N) loop in Lua to set every key to `nil`, which is significantly slower for large tables.","model_patch":"```lua\nt = {}\n```\nReason: Creating a new table with `t = {}` is an O(1) operation, whereas `table.Empty(t)` runs an O(N) loop in Lua to set every key to `nil`, which is significantly slower for large tables."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4759,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Set representation (O(1) lookup)\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"cherry\"] = true\n}\n\n-- Checking existence\nif mySet[\"banana\"] then\n    -- Value exists in the set\nend\n```\nReason: Using values as keys in a table allows O(1) direct hash-map lookups instead of table.HasValue's O(N) linear search.","model_patch":"```lua\n-- Set representation (O(1) lookup)\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"cherry\"] = true\n}\n\n-- Checking existence\nif mySet[\"banana\"] then\n    -- Value exists in the set\nend\n```\nReason: Using values as keys in a table allows O(1) direct hash-map lookups instead of table.HasValue's O(N) linear search."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4976,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal tbl = {\n    x = 1,\n    y = 2,\n    z = 3\n}\n```\nReason: Putting fields in the table constructor allows LuaJIT to pre-allocate the table with the correct hash and array sizes, avoiding the performance overhead of rehashing and resizing that occurs when assigning fields one by one to an empty table.","model_patch":"```lua\nlocal tbl = {\n    x = 1,\n    y = 2,\n    z = 3\n}\n```\nReason: Putting fields in the table constructor allows LuaJIT to pre-allocate the table with the correct hash and array sizes, avoiding the performance overhead of rehashing and resizing that occurs when assigning fields one by one to an empty table."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5482,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random internally calls table.GetKeys to support non-sequential tables, which runs in O(N) time and allocates a new table, whereas indexing directly with the length operator runs in O(1) time and allocates no memory.","model_patch":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random internally calls table.GetKeys to support non-sequential tables, which runs in O(N) time and allocates a new table, whereas indexing directly with the length operator runs in O(1) time and allocates no memory."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4775,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal square = x * x\n```\nReason: Local multiplication `x * x` is direct and compiled by LuaJIT to a single CPU instruction, avoiding the overhead of the exponentiation operator `^` or calling `math.pow`.","model_patch":"```lua\nlocal square = x * x\n```\nReason: Local multiplication `x * x` is direct and compiled by LuaJIT to a single CPU instruction, avoiding the overhead of the exponentiation operator `^` or calling `math.pow`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (Medium)","model_name_or_path":"Gemini 3.5 Flash (Medium)","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":4830,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n    -- code\nend\n```\nReason: player.Iterator() is the modern, optimized alternative to player.GetAll() that avoids table allocation and garbage collection overhead.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n    -- code\nend\n```\nReason: player.Iterator() is the modern, optimized alternative to player.GetAll() that avoids table allocation and garbage collection overhead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8594,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n\tif ent:GetClass() == \"prop_physics\" then\n\t\t-- Action to perform on each prop_physics entity\n\tend\nend\n```\nReason: Using ents.Iterator() leverages Garry's Mod's internally cached entity list, allowing you to iterate over all entities and filter by class without allocating a new table of every entity in the map.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n\tif ent:GetClass() == \"prop_physics\" then\n\t\t-- Action to perform on each prop_physics entity\n\tend\nend\n```\nReason: Using ents.Iterator() leverages Garry's Mod's internally cached entity list, allowing you to iterate over all entities and filter by class without allocating a new table of every entity in the map."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":4870,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback code runs here\nend)\n```\nReason: Garry's Mod uses the hook.Add function to register callbacks to events like \"Think\" using a unique identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback code runs here\nend)\n```\nReason: Garry's Mod uses the hook.Add function to register callbacks to events like \"Think\" using a unique identifier."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":5286,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif IsValid(ent) then\n    -- ent is safe to use\nend\n```\nReason: The global `IsValid()` function safely checks if the reference is not nil, is a valid Entity object, and has not been removed from the game, preventing runtime errors that would occur if you called methods directly on a nil or NULL entity reference.","model_patch":"```lua\nif IsValid(ent) then\n    -- ent is safe to use\nend\n```\nReason: The global `IsValid()` function safely checks if the reference is not nil, is a valid Entity object, and has not been removed from the game, preventing runtime errors that would occur if you called methods directly on a nil or NULL entity reference."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4585,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the net message here\nend)\n```\nReason: net.Receive is the standard Garry's Mod API function used to register a receiver callback for net messages with a specific identifier.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the net message here\nend)\n```\nReason: net.Receive is the standard Garry's Mod API function used to register a receiver callback for net messages with a specific identifier."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7347,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal zero = Angle()\n\n-- Reuse 'zero' in the hot path. If you need to modify it, reset it in-place:\n-- zero:Zero()\n```\nReason: Caching a single Angle object outside the hot path avoids memory allocation and garbage collection overhead, and it can be reset in-place using the `:Zero()` method if modifications are needed.","model_patch":"```lua\nlocal zero = Angle()\n\n-- Reuse 'zero' in the hot path. If you need to modify it, reset it in-place:\n-- zero:Zero()\n```\nReason: Caching a single Angle object outside the hot path avoids memory allocation and garbage collection overhead, and it can be reset in-place using the `:Zero()` method if modifications are needed."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6006,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal addon_color = Color(255, 0, 0)\nlocal current_color = addon_color\n```\nReason: Local variables are accessed directly via virtual machine registers, which is significantly faster than nested tables that require multiple table indexing (hash map lookup) operations.","model_patch":"```lua\nlocal addon_color = Color(255, 0, 0)\nlocal current_color = addon_color\n```\nReason: Local variables are accessed directly via virtual machine registers, which is significantly faster than nested tables that require multiple table indexing (hash map lookup) operations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5556,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: `ply:getDarkRPVar(\"job\")` is the official DarkRP API designed to retrieve networked player variables like job names, offering better performance and reliability than generic `GetNWString` calls.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: `ply:getDarkRPVar(\"job\")` is the official DarkRP API designed to retrieve networked player variables like job names, offering better performance and reliability than generic `GetNWString` calls."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5936,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal threshold = 100\nlocal isWithinThreshold = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: Using Vector:DistToSqr avoids the expensive square root operation performed by Vector:Distance, making threshold comparisons significantly faster.","model_patch":"```lua\nlocal threshold = 100\nlocal isWithinThreshold = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: Using Vector:DistToSqr avoids the expensive square root operation performed by Vector:Distance, making threshold comparisons significantly faster."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11365,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Code to execute on each entity\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator because it avoids creating a new table copy of all entities like `ents.GetAll()` does, and it returns the iterator function, state, and index directly so it does not need to be wrapped in `ipairs()`.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Code to execute on each entity\nend\n```\nReason: `ents.Iterator()` is the wiki-recommended efficient iterator because it avoids creating a new table copy of all entities like `ents.GetAll()` does, and it returns the iterator function, state, and index directly so it does not need to be wrapped in `ipairs()`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":5359,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ply = Entity(1) -- Target player\nlocal radius = 500 -- Query radius in Hammer units\nlocal entities = ents.FindInSphere(ply:GetPos(), radius)\n```\nReason: ents.FindInSphere utilizes the engine's internal BSP spatial partitioning grid to quickly filter entities, making it significantly faster than iterating over all entities in Lua or using expensive PVS checks.","model_patch":"```lua\nlocal ply = Entity(1) -- Target player\nlocal radius = 500 -- Query radius in Hammer units\nlocal entities = ents.FindInSphere(ply:GetPos(), radius)\n```\nReason: ents.FindInSphere utilizes the engine's internal BSP spatial partitioning grid to quickly filter entities, making it significantly faster than iterating over all entities in Lua or using expensive PVS checks."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5690,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n    local found = {}\n    local radiusSqr = radius * radius\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        local ply = plys[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            found[#found + 1] = ply\n        end\n    end\n    return found\nend\n```\nReason: Iterating over `player.GetAll()` with `DistToSqr` only checks the small player pool (typically ≤ 128) instead of querying the engine's spatial partition and allocating Lua objects for thousands of map, prop, and weapon entities.","model_patch":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n    local found = {}\n    local radiusSqr = radius * radius\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        local ply = plys[i]\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            found[#found + 1] = ply\n        end\n    end\n    return found\nend\n```\nReason: Iterating over `player.GetAll()` with `DistToSqr` only checks the small player pool (typically ≤ 128) instead of querying the engine's spatial partition and allocating Lua objects for thousands of map, prop, and weapon entities."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8605,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: The numerical for loop is faster because it uses specialized bytecode instructions (`FORPREP`/`FORLOOP`) that manage the counter and bounds in registers, avoiding the explicit increment and comparison overhead of a while loop.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: The numerical for loop is faster because it uses specialized bytecode instructions (`FORPREP`/`FORLOOP`) that manage the counter and bounds in registers, avoiding the explicit increment and comparison overhead of a while loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7957,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Faster: Call hook.Run once per tick with the list of all players\nlocal plys = player.GetAll()\nhook.Run(\"TickAllPlayers\", plys)\n\n-- Listener side iterates locally using a fast loop\nhook.Add(\"TickAllPlayers\", \"MyCustomLogic\", function(plys)\n    for i = 1, #plys do\n        local ply = plys[i]\n        -- Custom logic here\n    end\nend)\n```\nReason: Calling hook.Run once avoids the significant overhead of repeated hook table lookups and function invocation wrapper logic for every player, consolidating it into a single hook call followed by a fast local Lua loop.","model_patch":"```lua\n-- Faster: Call hook.Run once per tick with the list of all players\nlocal plys = player.GetAll()\nhook.Run(\"TickAllPlayers\", plys)\n\n-- Listener side iterates locally using a fast loop\nhook.Add(\"TickAllPlayers\", \"MyCustomLogic\", function(plys)\n    for i = 1, #plys do\n        local ply = plys[i]\n        -- Custom logic here\n    end\nend)\n```\nReason: Calling hook.Run once avoids the significant overhead of repeated hook table lookups and function invocation wrapper logic for every player, consolidating it into a single hook call followed by a fast local Lua loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":7769,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ply\nhook.Add(\"HUDPaint\", \"OptimizedHealthHUD\", function()\n    ply = ply or LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n\n    -- The three draw calls using the cached health variable\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 50, 50, color_white)\n    draw.RoundedBox(0, 50, 70, health * 2, 20, Color(200, 50, 50))\n    draw.SimpleText(health .. \"/100\", \"DermaDefault\", 55, 72, color_white)\nend)\n```\nReason: Caching the LocalPlayer reference and storing the Health() return value in a local variable prevents repetitive, expensive Lua-to-C boundary crossings and engine queries across three separate calls within a high-frequency rendering hook.","model_patch":"```lua\nlocal ply\nhook.Add(\"HUDPaint\", \"OptimizedHealthHUD\", function()\n    ply = ply or LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local health = ply:Health()\n\n    -- The three draw calls using the cached health variable\n    draw.SimpleText(\"Health: \" .. health, \"DermaDefault\", 50, 50, color_white)\n    draw.RoundedBox(0, 50, 70, health * 2, 20, Color(200, 50, 50))\n    draw.SimpleText(health .. \"/100\", \"DermaDefault\", 55, 72, color_white)\nend)\n```\nReason: Caching the LocalPlayer reference and storing the Health() return value in a local variable prevents repetitive, expensive Lua-to-C boundary crossings and engine queries across three separate calls within a high-frequency rendering hook."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8442,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal color_white = Color(255, 255, 255)\n\n-- Inside the paint loop, use the cached variable:\nsurface.SetDrawColor(color_white)\n```\nReason: Calling the `Color()` function creates a new table on every frame, which triggers frequent garbage collection and reduces performance, whereas caching the color object outside the loop avoids table allocations.","model_patch":"```lua\nlocal color_white = Color(255, 255, 255)\n\n-- Inside the paint loop, use the cached variable:\nsurface.SetDrawColor(color_white)\n```\nReason: Calling the `Color()` function creates a new table on every frame, which triggers frequent garbage collection and reduces performance, whereas caching the color object outside the loop avoids table allocations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5292,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Localizing the function caches it on the stack, avoiding expensive hash table lookups of `math` and `sin` on each loop iteration.","model_patch":"```lua\nlocal sin = math.sin\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Localizing the function caches it on the stack, avoiding expensive hash table lookups of `math` and `sin` on each loop iteration."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":7541,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal lp\nlocal function GetLocalPlayer()\n    if not lp or not lp:IsValid() then\n        lp = LocalPlayer()\n    end\n    return lp\nend\n```\nReason: Caching the `LocalPlayer` entity in a local variable via lazy-loading avoids repeated expensive global table lookups and engine-level calls, leveraging Lua's fast local register access instead.","model_patch":"```lua\nlocal lp\nlocal function GetLocalPlayer()\n    if not lp or not lp:IsValid() then\n        lp = LocalPlayer()\n    end\n    return lp\nend\n```\nReason: Caching the `LocalPlayer` entity in a local variable via lazy-loading avoids repeated expensive global table lookups and engine-level calls, leveraging Lua's fast local register access instead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":7287,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.7 -- Cosine of the maximum angle tolerance (0.7 is roughly 45 degrees)\n    local dir = (ply2:GetShootPos() - ply1:GetShootPos()):GetNormalized()\n    return ply1:GetAimVector():Dot(dir) > threshold and ply2:GetAimVector():Dot(-dir) > threshold\nend\n```\nReason: Comparing the dot products of the players' aim vectors against the normalized relative direction vector directly evaluates the cosine of the angle between them, bypassing the need for expensive inverse trigonometric functions like math.acos.","model_patch":"```lua\nlocal function ArePlayersLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.7 -- Cosine of the maximum angle tolerance (0.7 is roughly 45 degrees)\n    local dir = (ply2:GetShootPos() - ply1:GetShootPos()):GetNormalized()\n    return ply1:GetAimVector():Dot(dir) > threshold and ply2:GetAimVector():Dot(-dir) > threshold\nend\n```\nReason: Comparing the dot products of the players' aim vectors against the normalized relative direction vector directly evaluates the cosine of the angle between them, bypassing the need for expensive inverse trigonometric functions like math.acos."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5926,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: SomeHelper(ply) is faster because it avoids the table and metatable lookup on the player object required by the colon syntax.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: SomeHelper(ply) is faster because it avoids the table and metatable lookup on the player object required by the colon syntax."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5065,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nMsg( \"Debug message\\n\" )\n```\nReason: Msg writes a raw string directly to the engine console, bypassing the string conversion (tostring), tab-separation, and formatting overhead associated with GMod's print function.","model_patch":"```lua\nMsg( \"Debug message\\n\" )\n```\nReason: Msg writes a raw string directly to the engine console, bypassing the string conversion (tostring), tab-separation, and formatting overhead associated with GMod's print function."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5862,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops are the fastest in Garry's Mod (LuaJIT) because they avoid the function call/iterator overhead of ipairs/pairs, and the loop limit (#tbl) is evaluated only once before iteration begins.","model_patch":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops are the fastest in Garry's Mod (LuaJIT) because they avoid the function call/iterator overhead of ipairs/pairs, and the loop limit (#tbl) is evaluated only once before iteration begins."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5473,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal players = player.GetAll()\nlocal names = {}\nlocal count = 0\n\n-- Fused filter and map in a single procedural loop\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isCop() then -- Filter\n        count = count + 1\n        names[count] = ply:Nick() -- Map\n    end\nend\n```\nReason: Fusing filter and map operations into a single imperative loop avoids intermediate table allocations, function call overhead, and garbage collection pressure generated by functional combinator chains.","model_patch":"```lua\nlocal players = player.GetAll()\nlocal names = {}\nlocal count = 0\n\n-- Fused filter and map in a single procedural loop\nfor i = 1, #players do\n    local ply = players[i]\n    if ply:isCop() then -- Filter\n        count = count + 1\n        names[count] = ply:Nick() -- Map\n    end\nend\n```\nReason: Fusing filter and map operations into a single imperative loop avoids intermediate table allocations, function call overhead, and garbage collection pressure generated by functional combinator chains."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7068,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function rebuildCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache_Join\", function()\n    -- Delay by 0 seconds to allow player.GetAll() to update on the next frame\n    timer.Simple(0, rebuildCache)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache_Leave\", function()\n    -- Delay by 0 seconds so the disconnecting player is fully removed before we rebuild\n    timer.Simple(0, rebuildCache)\nend)\n\nhook.Add(\"Think\", \"OptimizedThinkHook\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Tick/Think logic here\n    end\nend)\n```\nReason: Calling player.GetAll() generates a brand new table on every call, causing significant garbage collection overhead when run every tick; caching it and updating it asynchronously on spawn/disconnect hooks eliminates this performance bottleneck.","model_patch":"```lua\nlocal cachedPlayers = player.GetAll()\n\nlocal function rebuildCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"RefreshPlayerCache_Join\", function()\n    -- Delay by 0 seconds to allow player.GetAll() to update on the next frame\n    timer.Simple(0, rebuildCache)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"RefreshPlayerCache_Leave\", function()\n    -- Delay by 0 seconds so the disconnecting player is fully removed before we rebuild\n    timer.Simple(0, rebuildCache)\nend)\n\nhook.Add(\"Think\", \"OptimizedThinkHook\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- Tick/Think logic here\n    end\nend)\n```\nReason: Calling player.GetAll() generates a brand new table on every call, causing significant garbage collection overhead when run every tick; caching it and updating it asynchronously on spawn/disconnect hooks eliminates this performance bottleneck."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12374,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal playerData = {}\n\n-- Writing data\nplayerData[ply] = value\n\n-- Reading data\nlocal value = playerData[ply]\n```\nReason: Indexing a standard Lua table with the player object bypasses the player userdata's custom `__index` metamethod overhead, yielding direct table lookup speeds.","model_patch":"```lua\nlocal playerData = {}\n\n-- Writing data\nplayerData[ply] = value\n\n-- Reading data\nlocal value = playerData[ply]\n```\nReason: Indexing a standard Lua table with the player object bypasses the player userdata's custom `__index` metamethod overhead, yielding direct table lookup speeds."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5522,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal array = { \"value1\", \"value2\", \"value3\" }\n\nfor i = 1, #array do\n    local val = array[i]\nend\n```\nReason: Sequential number-indexed arrays iterated with a numeric for-loop are stored in the contiguous array part of the Lua table and can be highly optimized and JIT-compiled, whereas string-keyed maps reside in the hash part and require traversing via pairs/next, which is significantly slower.","model_patch":"```lua\nlocal array = { \"value1\", \"value2\", \"value3\" }\n\nfor i = 1, #array do\n    local val = array[i]\nend\n```\nReason: Sequential number-indexed arrays iterated with a numeric for-loop are stored in the contiguous array part of the Lua table and can be highly optimized and JIT-compiled, whereas string-keyed maps reside in the hash part and require traversing via pairs/next, which is significantly slower."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5101,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate numeric arguments avoids the overhead of indexing table fields or invoking metatables associated with a Color object.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\n```\nReason: Passing separate numeric arguments avoids the overhead of indexing table fields or invoking metatables associated with a Color object."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17900,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid) .. \";\")\n```\nReason: Local SQLite runs in-process on the game server's host machine, eliminating the network round-trip latency inherent in querying a remote MySQL database.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid) .. \";\")\n```\nReason: Local SQLite runs in-process on the game server's host machine, eliminating the network round-trip latency inherent in querying a remote MySQL database."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":6852,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal plyMeta = FindMetaTable(\"Player\")\nlocal oldSteamID = plyMeta.SteamID\n\nfunction plyMeta:SteamID()\n    local steamID = self._steamID\n    if not steamID then\n        steamID = oldSteamID(self)\n        self._steamID = steamID\n    end\n    return steamID\nend\n```\nReason: Overriding the Player metatable's SteamID method to retrieve and store the string on the Lua-side player object avoids the performance overhead of crossing the C++ boundary on subsequent calls.","model_patch":"```lua\nlocal plyMeta = FindMetaTable(\"Player\")\nlocal oldSteamID = plyMeta.SteamID\n\nfunction plyMeta:SteamID()\n    local steamID = self._steamID\n    if not steamID then\n        steamID = oldSteamID(self)\n        self._steamID = steamID\n    end\n    return steamID\nend\n```\nReason: Overriding the Player metatable's SteamID method to retrieve and store the string on the Lua-side player object avoids the performance overhead of crossing the C++ boundary on subsequent calls."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":5339,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"some small string\"\nend\nlocal result = table.concat(parts)\n```\nReason: Lua strings are immutable, so repeated `..` concatenation creates a new string object and copies data at each step, leading to $O(N^2)$ complexity and heavy garbage collection, whereas `table.concat` allocates the final string buffer once and copies all elements in a single pass.","model_patch":"```lua\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"some small string\"\nend\nlocal result = table.concat(parts)\n```\nReason: Lua strings are immutable, so repeated `..` concatenation creates a new string object and copies data at each step, leading to $O(N^2)$ complexity and heavy garbage collection, whereas `table.concat` allocates the final string buffer once and copies all elements in a single pass."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13908,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: draw.RoundedBox performs extra logic, table lookups, and texture bindings to support corner rounding, whereas surface.DrawRect is a direct, low-overhead engine call for drawing solid rectangles.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: draw.RoundedBox performs extra logic, table lookups, and texture bindings to support corner rounding, whereas surface.DrawRect is a direct, low-overhead engine call for drawing solid rectangles."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":5446,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(str)\n```\nReason: The `surface.*` functions are implemented directly in C++ and avoid the Lua-land overhead of `draw.*` helpers, which perform extra string parsing, alignment calculations via `surface.GetTextSize`, and multiple redraw passes (especially in outlined functions) every frame.","model_patch":"```lua\nsurface.SetFont(\"DermaDefault\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(str)\n```\nReason: The `surface.*` functions are implemented directly in C++ and avoid the Lua-land overhead of `draw.*` helpers, which perform extra string parsing, alignment calculations via `surface.GetTextSize`, and multiple redraw passes (especially in outlined functions) every frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4858,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal tbl = { \"apple\", \"banana\", \"cherry\" }\nlocal length = #tbl\n```\nReason: The `#` operator is the standard, built-in Lua length operator and is the most efficient, idiomatic way to get the length of a sequential array-like table.","model_patch":"```lua\nlocal tbl = { \"apple\", \"banana\", \"cherry\" }\nlocal length = #tbl\n```\nReason: The `#` operator is the standard, built-in Lua length operator and is the most efficient, idiomatic way to get the length of a sequential array-like table."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6486,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nt = {}\n```\nReason: Creating a new table with `t = {}` is a constant-time O(1) allocation, whereas `table.Empty(t)` runs in O(N) time because it iterates over the entire table in Lua to set each key to nil.","model_patch":"```lua\nt = {}\n```\nReason: Creating a new table with `t = {}` is a constant-time O(1) allocation, whereas `table.Empty(t)` runs in O(N) time because it iterates over the entire table in Lua to set each key to nil."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8141,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Creating a set where values are stored as keys mapping to true\nlocal mySet = {\n    [\"value1\"] = true,\n    [\"value2\"] = true,\n    [\"value3\"] = true\n}\n\n-- Fast O(1) membership check\nif mySet[\"value2\"] then\n    -- Value exists in the set\nend\n```\nReason: Key-based table lookups utilize Lua's internal hash map implementation for O(1) average-time complexity, whereas table.HasValue performs a sequential linear scan (O(N)) over the array.","model_patch":"```lua\n-- Creating a set where values are stored as keys mapping to true\nlocal mySet = {\n    [\"value1\"] = true,\n    [\"value2\"] = true,\n    [\"value3\"] = true\n}\n\n-- Fast O(1) membership check\nif mySet[\"value2\"] then\n    -- Value exists in the set\nend\n```\nReason: Key-based table lookups utilize Lua's internal hash map implementation for O(1) average-time complexity, whereas table.HasValue performs a sequential linear scan (O(N)) over the array."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4715,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal t = { x = 1, y = 2, z = 3 }\n```\nReason: Defining fields directly inside the table constructor allows LuaJIT to pre-allocate the table with the correct size, avoiding the performance overhead of dynamic resizing and re-hashing that occurs when assigning fields individually after creation.","model_patch":"```lua\nlocal t = { x = 1, y = 2, z = 3 }\n```\nReason: Defining fields directly inside the table constructor allows LuaJIT to pre-allocate the table with the correct size, avoiding the performance overhead of dynamic resizing and re-hashing that occurs when assigning fields individually after creation."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4532,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random supports non-sequential tables by iterating keys internally, whereas direct indexing with math.random and the length operator (#) is an O(1) operation.","model_patch":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random supports non-sequential tables by iterating keys internally, whereas direct indexing with math.random and the length operator (#) is an O(1) operation."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":4584,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication `x * x` is significantly faster in Lua and LuaJIT than using the exponentiation operator `x ^ 2` or calling `math.pow(x, 2)`.","model_patch":"```lua\nlocal squared = x * x\n```\nReason: Direct multiplication `x * x` is significantly faster in Lua and LuaJIT than using the exponentiation operator `x ^ 2` or calling `math.pow(x, 2)`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.5 Flash (High)","model_name_or_path":"Gemini 3.5 Flash (High)","attemptIndex":1,"status":"pass","detail":"Uses player.Iterator() (wiki-recommended Lua-cached iterator).","durationMs":5640,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ply in player.Iterator() do\n\t-- code\nend\n```\nReason: player.Iterator() is the modern, optimized iterator function introduced in Garry's Mod to loop through players without allocating a new table like player.GetAll() does.","model_patch":"```lua\nfor _, ply in player.Iterator() do\n\t-- code\nend\n```\nReason: player.Iterator() is the modern, optimized iterator function introduced in Garry's Mod to loop through players without allocating a new table like player.GetAll() does."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12374,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ipairs( ents.FindByClass( \"prop_physics\" ) ) do\n    -- Your code here\nend\n```\nReason: `ents.FindByClass()` directly returns a table containing only the entities matching the specified class, avoiding the performance cost and memory allocation of building a table containing every single entity in the map (which is what `ents.GetAll()` does).","model_patch":"```lua\nfor _, ent in ipairs( ents.FindByClass( \"prop_physics\" ) ) do\n    -- Your code here\nend\n```\nReason: `ents.FindByClass()` directly returns a table containing only the entities matching the specified class, avoiding the performance cost and memory allocation of building a table containing every single entity in the map (which is what `ents.GetAll()` does)."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":8114,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback body\nend)\n```\nReason: The `hook.Add` function is the standard Garry's Mod API for registering a callback function to a specific engine event using a unique string identifier.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback body\nend)\n```\nReason: The `hook.Add` function is the standard Garry's Mod API for registering a callback function to a specific engine event using a unique string identifier."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":9131,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif IsValid(ent) then\n    -- It is now safe to call methods on ent\nend\n```\nReason: The IsValid function checks both that the Lua object is not nil and that the underlying C++ entity has not been removed from the server.","model_patch":"```lua\nif IsValid(ent) then\n    -- It is now safe to call methods on ent\nend\n```\nReason: The IsValid function checks both that the Lua object is not nil and that the underlying C++ entity has not been removed from the server."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8109,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handler code here\nend)\n```\nReason: `net.Receive` is the standard Garry's Mod function for registering a callback to handle incoming network messages.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handler code here\nend)\n```\nReason: `net.Receive` is the standard Garry's Mod function for registering a callback to handle incoming network messages."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18571,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cached_angle = Angle()\n\nlocal function HotPath()\n    cached_angle:Zero()\n    -- Use and modify cached_angle here\nend\n```\nReason: Reusing a pre-allocated Angle object and resetting it with :Zero() avoids expensive userdata allocations and garbage collection overhead in frequently executed code.","model_patch":"```lua\nlocal cached_angle = Angle()\n\nlocal function HotPath()\n    cached_angle:Zero()\n    -- Use and modify cached_angle here\nend\n```\nReason: Reusing a pre-allocated Angle object and resetting it with :Zero() avoids expensive userdata allocations and garbage collection overhead in frequently executed code."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10602,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal config_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyAddonPaint\", function()\n    surface.SetDrawColor(config_color)\nend)\n```\nReason: Local variables are assigned directly to LuaJIT registers, completely bypassing the expensive hash map lookups required for nested table indexing.","model_patch":"```lua\nlocal config_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyAddonPaint\", function()\n    surface.SetDrawColor(config_color)\nend)\n```\nReason: Local variables are assigned directly to LuaJIT registers, completely bypassing the expensive hash map lookups required for nested table indexing."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13969,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system (DarkRPVars) instead of default networked strings to sync player data and reduce bandwidth overhead.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system (DarkRPVars) instead of default networked strings to sync player data and reduce bandwidth overhead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8597,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal isWithinThreshold = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: `DistToSqr` avoids the computationally expensive square root calculation required by standard distance functions, making threshold comparisons significantly faster.","model_patch":"```lua\nlocal isWithinThreshold = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: `DistToSqr` avoids the computationally expensive square root calculation required by standard distance functions, making threshold comparisons significantly faster."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9563,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Do something with ent\nend\n```\nReason: `ents.Iterator()` is recommended over `ipairs(ents.GetAll())` because it is a stateless iterator that avoids allocating and populating a new table on every loop, significantly improving performance.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Do something with ent\nend\n```\nReason: `ents.Iterator()` is recommended over `ipairs(ents.GetAll())` because it is a stateless iterator that avoids allocating and populating a new table on every loop, significantly improving performance."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":8885,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal radius = 500\nlocal nearEnts = ents.FindInSphere(ply:GetPos(), radius)\nfor i = 1, #nearEnts do\n    local ent = nearEnts[i]\n    -- Process nearby entity\nend\n```\nReason: ents.FindInSphere is executed directly in the engine's C++ backend and uses spatial partitioning (octrees) to rapidly cull distant entities without iterating through the entire entity list in Lua.","model_patch":"```lua\nlocal radius = 500\nlocal nearEnts = ents.FindInSphere(ply:GetPos(), radius)\nfor i = 1, #nearEnts do\n    local ent = nearEnts[i]\n    -- Process nearby entity\nend\n```\nReason: ents.FindInSphere is executed directly in the engine's C++ backend and uses spatial partitioning (octrees) to rapidly cull distant entities without iterating through the entire entity list in Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11280,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n    local players = {}\n    local radiusSqr = radius * radius\n    \n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            table.insert(players, ply)\n        end\n    end\n    \n    return players\nend\n```\nReason: Iterating `player.GetAll()` and checking `DistToSqr` is significantly faster because it only evaluates players (a small, cached array) instead of traversing the spatial partition and checking potentially thousands of entities within the sphere.","model_patch":"```lua\nlocal function GetPlayersInSphere(pos, radius)\n    local players = {}\n    local radiusSqr = radius * radius\n    \n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            table.insert(players, ply)\n        end\n    end\n    \n    return players\nend\n```\nReason: Iterating `player.GetAll()` and checking `DistToSqr` is significantly faster because it only evaluates players (a small, cached array) instead of traversing the spatial partition and checking potentially thousands of entities within the sphere."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9714,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric for loops are heavily optimized in LuaJIT (which Garry's Mod uses) and avoid the overhead of manual condition checking and variable incrementing required by while loops.","model_patch":"```lua\nfor i = 1, n do\n    -- loop body\nend\n```\nReason: Numeric for loops are heavily optimized in LuaJIT (which Garry's Mod uses) and avoid the overhead of manual condition checking and variable incrementing required by while loops."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14144,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Slower Pattern: Looping players and calling hook.Run per player\nlocal function TickSlow()\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        hook.Run(\"CustomPlayerUpdate\", plys[i])\n    end\nend\nhook.Add(\"Tick\", \"TickSlowExample\", TickSlow)\n\n-- Faster Pattern: Calling hook.Run once and passing the player table\nlocal function TickFast()\n    hook.Run(\"CustomPlayersUpdate\", player.GetAll())\nend\nhook.Add(\"Tick\", \"TickFastExample\", TickFast)\n```\nReason: Calling `hook.Run` incurs overhead from table lookups and internal hook library iterations; executing it once per tick rather than once per player significantly reduces this execution cost.","model_patch":"```lua\n-- Slower Pattern: Looping players and calling hook.Run per player\nlocal function TickSlow()\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        hook.Run(\"CustomPlayerUpdate\", plys[i])\n    end\nend\nhook.Add(\"Tick\", \"TickSlowExample\", TickSlow)\n\n-- Faster Pattern: Calling hook.Run once and passing the player table\nlocal function TickFast()\n    hook.Run(\"CustomPlayersUpdate\", player.GetAll())\nend\nhook.Add(\"Tick\", \"TickFastExample\", TickFast)\n```\nReason: Calling `hook.Run` incurs overhead from table lookups and internal hook library iterations; executing it once per tick rather than once per player significantly reduces this execution cost."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11375,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"OptimizedHUDDrawCalls\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 50, color_white)\n    surface.SetDrawColor(255, 0, 0, 255)\n    surface.DrawRect(50, 70, hp, 20)\n    draw.SimpleText(hp .. \" HP\", \"DermaDefault\", 50, 100, color_white)\nend)\n```\nReason: Caching the result of LocalPlayer():Health() into a local variable avoids making multiple expensive cross-boundary C++ function calls every single frame.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"OptimizedHUDDrawCalls\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 50, 50, color_white)\n    surface.SetDrawColor(255, 0, 0, 255)\n    surface.DrawRect(50, 70, hp, 20)\n    draw.SimpleText(hp .. \" HP\", \"DermaDefault\", 50, 100, color_white)\nend)\n```\nReason: Caching the result of LocalPlayer():Health() into a local variable avoids making multiple expensive cross-boundary C++ function calls every single frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14461,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cached_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"OptimizedPaint\", function()\n    -- Use the locally cached color instead of calling Color() every frame\n    surface.SetDrawColor(cached_color)\n    \n    -- Note: For pure white specifically, you can also use the built-in global constant:\n    -- surface.SetDrawColor(color_white)\nend)\n```\nReason: Calling Color() inside a render loop allocates a new table in memory every frame which causes performance-draining garbage collection overhead, whereas caching it outside the loop (or using global constants) allocates memory only once.","model_patch":"```lua\nlocal cached_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"OptimizedPaint\", function()\n    -- Use the locally cached color instead of calling Color() every frame\n    surface.SetDrawColor(cached_color)\n    \n    -- Note: For pure white specifically, you can also use the built-in global constant:\n    -- surface.SetDrawColor(color_white)\nend)\n```\nReason: Calling Color() inside a render loop allocates a new table in memory every frame which causes performance-draining garbage collection overhead, whereas caching it outside the loop (or using global constants) allocates memory only once."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9470,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Local variable lookups are faster than global table lookups in Lua.","model_patch":"```lua\nlocal sin = math.sin\nfor i = 1, 1000000 do\n    local val = sin(i)\nend\n```\nReason: Local variable lookups are faster than global table lookups in Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16344,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"OptimizedLocalPlayerCache\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        if not IsValid(ply) then return end\n    end\n\n    -- Use 'ply' directly instead of calling LocalPlayer()\nend)\n```\nReason: Caching the entity object locally and only refreshing it when it becomes invalid prevents the performance overhead of repeatedly crossing the C++/Lua boundary to execute the LocalPlayer() function every frame.","model_patch":"```lua\nlocal ply = LocalPlayer()\n\nhook.Add(\"Think\", \"OptimizedLocalPlayerCache\", function()\n    if not IsValid(ply) then\n        ply = LocalPlayer()\n        if not IsValid(ply) then return end\n    end\n\n    -- Use 'ply' directly instead of calling LocalPlayer()\nend)\n```\nReason: Caching the entity object locally and only refreshing it when it becomes invalid prevents the performance overhead of repeatedly crossing the C++/Lua boundary to execute the LocalPlayer() function every frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":21900,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function AreAimDirectionsFacing(ply1, ply2, threshold)\n    -- A threshold of -0.8 means the vectors are within ~36 degrees of being perfectly opposite\n    return ply1:GetAimVector():Dot(ply2:GetAimVector()) < (threshold or -0.8)\nend\n```\nReason: The dot product of two normalized vectors naturally returns the cosine of the angle between them, approaching -1 when they point in perfectly opposite directions, which cleanly bypasses the need for expensive trigonometric functions like math.acos.","model_patch":"```lua\nlocal function AreAimDirectionsFacing(ply1, ply2, threshold)\n    -- A threshold of -0.8 means the vectors are within ~36 degrees of being perfectly opposite\n    return ply1:GetAimVector():Dot(ply2:GetAimVector()) < (threshold or -0.8)\nend\n```\nReason: The dot product of two normalized vectors naturally returns the cosine of the angle between them, approaching -1 when they point in perfectly opposite directions, which cleanly bypasses the need for expensive trigonometric functions like math.acos."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10730,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Direct function calls avoid the additional overhead of userdata metatable index lookups required by the colon syntax.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Direct function calls avoid the additional overhead of userdata metatable index lookups required by the colon syntax."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10109,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nMsgN(\"debug message\")\n```\nReason: MsgN is a faster C-binding that directly outputs text with a newline, avoiding the additional Lua-side formatting and overhead of Garry's Mod's overridden print wrapper.","model_patch":"```lua\nMsgN(\"debug message\")\n```\nReason: MsgN is a faster C-binding that directly outputs text with a newline, avoiding the additional Lua-side formatting and overhead of Garry's Mod's overridden print wrapper."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8274,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, #myTable do\n    local value = myTable[i]\n    -- Do something with value\nend\n```\nReason: A numeric for loop avoids the overhead of function calls inherent to iterators like pairs or ipairs and is heavily optimized by Garry's Mod's underlying LuaJIT compiler.","model_patch":"```lua\nfor i = 1, #myTable do\n    local value = myTable[i]\n    -- Do something with value\nend\n```\nReason: A numeric for loop avoids the overhead of function calls inherent to iterators like pairs or ipairs and is heavily optimized by Garry's Mod's underlying LuaJIT compiler."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13115,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = {}\nlocal index = 1\nfor i = 1, #items do\n    local item = items[i]\n    if item.active then\n        result[index] = item.price * 2\n        index = index + 1\n    end\nend\n```\nReason: Native loops avoid closure allocation and function call overhead per element, allowing LuaJIT to trace and compile the operations into highly optimized machine code.","model_patch":"```lua\nlocal result = {}\nlocal index = 1\nfor i = 1, #items do\n    local item = items[i]\n    if item.active then\n        result[index] = item.price * 2\n        index = index + 1\n    end\nend\n```\nReason: Native loops avoid closure allocation and function call overhead per element, allowing LuaJIT to trace and compile the operations into highly optimized machine code."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":19119,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal activePlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"UpdatePlayerCache_Join\", function(ply)\n    table.insert(activePlayers, ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UpdatePlayerCache_Leave\", function(ply)\n    table.RemoveByValue(activePlayers, ply)\nend)\n\nhook.Add(\"Tick\", \"OptimizedPlayerTick\", function()\n    for i = 1, #activePlayers do\n        local ply = activePlayers[i]\n        if IsValid(ply) then\n            -- Your per-tick player logic goes here\n        end\n    end\nend)\n```\nReason: Caching the array and iterating with a numeric for-loop eliminates the per-tick table creation and iterator allocation of ipairs(player.GetAll()), drastically reducing garbage collection overhead and fully leveraging LuaJIT optimizations.","model_patch":"```lua\nlocal activePlayers = player.GetAll()\n\nhook.Add(\"PlayerInitialSpawn\", \"UpdatePlayerCache_Join\", function(ply)\n    table.insert(activePlayers, ply)\nend)\n\nhook.Add(\"PlayerDisconnected\", \"UpdatePlayerCache_Leave\", function(ply)\n    table.RemoveByValue(activePlayers, ply)\nend)\n\nhook.Add(\"Tick\", \"OptimizedPlayerTick\", function()\n    for i = 1, #activePlayers do\n        local ply = activePlayers[i]\n        if IsValid(ply) then\n            -- Your per-tick player logic goes here\n        end\n    end\nend)\n```\nReason: Caching the array and iterating with a numeric for-loop eliminates the per-tick table creation and iterator allocation of ipairs(player.GetAll()), drastically reducing garbage collection overhead and fully leveraging LuaJIT optimizations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10677,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal playerData = {}\n\n-- Write\nplayerData[ply] = \"temporary value\"\n\n-- Read (called often)\nlocal value = playerData[ply]\n```\nReason: Indexing a standard local Lua table avoids the expensive `__index` and `__newindex` C++ metamethod lookups that occur when accessing fields directly on the Player entity object.","model_patch":"```lua\nlocal playerData = {}\n\n-- Write\nplayerData[ply] = \"temporary value\"\n\n-- Read (called often)\nlocal value = playerData[ply]\n```\nReason: Indexing a standard local Lua table avoids the expensive `__index` and `__newindex` C++ metamethod lookups that occur when accessing fields directly on the Player entity object."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10114,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal items = {\n    \"apple\",\n    \"banana\",\n    \"cherry\"\n}\n\nfor i = 1, #items do\n    local item = items[i]\n    -- Do something with item\nend\n```\nReason: Sequential number-indexed arrays iterated with a numeric for loop are significantly faster in LuaJIT because they access memory linearly and avoid the function call overhead and string hashing costs associated with `pairs()`.","model_patch":"```lua\nlocal items = {\n    \"apple\",\n    \"banana\",\n    \"cherry\"\n}\n\nfor i = 1, #items do\n    local item = items[i]\n    -- Do something with item\nend\n```\nReason: Sequential number-indexed arrays iterated with a numeric for loop are significantly faster in LuaJIT because they access memory linearly and avoid the function call overhead and string hashing costs associated with `pairs()`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10770,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate number arguments is faster because it avoids the overhead of table indexing required when unpacking a Color object.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate number arguments is faster because it avoids the overhead of table indexing required when unpacking a Color object."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8333,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM players WHERE steamid = 'STEAM_0:0:12345'\")\nif result then\n    PrintTable(result)\nend\n```\nReason: Local SQLite avoids network round-trips entirely, making it inherently lower latency than remote MySQL for single-server operations.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM players WHERE steamid = 'STEAM_0:0:12345'\")\nif result then\n    PrintTable(result)\nend\n```\nReason: Local SQLite avoids network round-trips entirely, making it inherently lower latency than remote MySQL for single-server operations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12384,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal steamID = ply.CachedSteamID\nif not steamID then\n    steamID = ply:SteamID()\n    ply.CachedSteamID = steamID\nend\n```\nReason: Accessing a Lua table field avoids the expensive C++ boundary crossing and string allocation that occurs every time the ply:SteamID() method is called.","model_patch":"```lua\nlocal steamID = ply.CachedSteamID\nif not steamID then\n    steamID = ply:SteamID()\n    ply.CachedSteamID = steamID\nend\n```\nReason: Accessing a Lua table field avoids the expensive C++ boundary crossing and string allocation that occurs every time the ply:SteamID() method is called."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":8655,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 5000 do\n    pieces[#pieces + 1] = \"piece_\" .. i\nend\nlocal largeString = table.concat(pieces)\n```\nReason: table.concat pre-allocates memory for the final string in a single pass, avoiding the severe performance and garbage collection overhead of creating thousands of intermediate strings during repeated .. concatenations.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 5000 do\n    pieces[#pieces + 1] = \"piece_\" .. i\nend\nlocal largeString = table.concat(pieces)\n```\nReason: table.concat pre-allocates memory for the final string in a single pass, avoiding the severe performance and garbage collection overhead of creating thousands of intermediate strings during repeated .. concatenations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12564,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Calling `surface.DrawRect` directly bypasses the Lua function call overhead and internal radius checks of `draw.RoundedBox`, mapping more directly to the underlying engine functions.","model_patch":"```lua\nsurface.SetDrawColor(color)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Calling `surface.DrawRect` directly bypasses the Lua function call overhead and internal radius checks of `draw.RoundedBox`, mapping more directly to the underlying engine functions."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11152,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetFont(\"Default\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(\"Your text here\")\n```\nReason: surface.* functions are direct engine bindings in C++ and avoid the Lua wrapper overhead present in the draw library functions.","model_patch":"```lua\nsurface.SetFont(\"Default\")\nsurface.SetTextColor(255, 255, 255, 255)\nsurface.SetTextPos(x, y)\nsurface.DrawText(\"Your text here\")\n```\nReason: surface.* functions are direct engine bindings in C++ and avoid the Lua wrapper overhead present in the draw library functions."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10088,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n#my_table\n```\nReason: The `#` operator is native to Lua and is the fastest, preferred method for getting the length of a sequential, non-sparse array.","model_patch":"```lua\n#my_table\n```\nReason: The `#` operator is native to Lua and is the fastest, preferred method for getting the length of a sequential, non-sparse array."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13100,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nt = {}\n```\nReason: Assigning a new table is an O(1) operation that leaves the old table for the garbage collector, whereas table.Empty(t) is an O(N) operation that must iterate through every key to remove it.","model_patch":"```lua\nt = {}\n```\nReason: Assigning a new table is an O(1) operation that leaves the old table for the garbage collector, whereas table.Empty(t) is an O(N) operation that must iterate through every key to remove it."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11350,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true\n}\n\nif mySet[\"banana\"] then\n    -- Value exists\nend\n```\nReason: Dictionary key lookups operate in O(1) time complexity, whereas table.HasValue operates in O(n) time by sequentially iterating through the entire list.","model_patch":"```lua\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true\n}\n\nif mySet[\"banana\"] then\n    -- Value exists\nend\n```\nReason: Dictionary key lookups operate in O(1) time complexity, whereas table.HasValue operates in O(n) time by sequentially iterating through the entire list."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9783,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal myTable = { a = 1, b = 2, c = 3 }\n```\nReason: Using the table constructor pre-allocates the necessary hash slots, avoiding the performance overhead of dynamic table resizing and rehashing that occurs when assigning fields one by one to an empty table.","model_patch":"```lua\nlocal myTable = { a = 1, b = 2, c = 3 }\n```\nReason: Using the table constructor pre-allocates the necessary hash slots, avoiding the performance overhead of dynamic table resizing and rehashing that occurs when assigning fields one by one to an empty table."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10370,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random uses pairs() to iterate over all elements regardless of structure, whereas math.random(#tbl) utilizes the O(1) length operator for direct index access on sequential tables.","model_patch":"```lua\nlocal randomElement = tbl[math.random(#tbl)]\n```\nReason: table.Random uses pairs() to iterate over all elements regardless of structure, whereas math.random(#tbl) utilizes the O(1) length operator for direct index access on sequential tables."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8462,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nx * x\n```\nReason: In LuaJIT (which Garry's Mod uses), direct multiplication is significantly faster than the exponentiation operator (`x ^ 2`) or `math.pow`, as it avoids the overhead of those operations and compiles down to a very fast, single machine instruction.","model_patch":"```lua\nx * x\n```\nReason: In LuaJIT (which Garry's Mod uses), direct multiplication is significantly faster than the exponentiation operator (`x ^ 2`) or `math.pow`, as it avoids the overhead of those operations and compiles down to a very fast, single machine instruction."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (Low)","model_name_or_path":"Gemini 3.1 Pro (Low)","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":10858,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- do something with ply\nend\n```\nReason: ipairs is preferred over pairs for sequentially indexed tables like the one returned by player.GetAll() as it is more efficient and guarantees sequential iteration order.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- do something with ply\nend\n```\nReason: ipairs is preferred over pairs for sequentially indexed tables like the one returned by player.GetAll() as it is more efficient and guarantees sequential iteration order."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":18540,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- Your code here\nend\n```\nReason: `ents.FindByClass` performs the class filtering internally in C++ and returns a table containing only the matching entities, avoiding the expensive memory allocation of building a table of every entity in the map like `ents.GetAll()` would do.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- Your code here\nend\n```\nReason: `ents.FindByClass` performs the class filtering internally in C++ and returns a table containing only the matching entities, avoiding the expensive memory allocation of building a table of every entity in the map like `ents.GetAll()` would do."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":9006,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback body\nend)\n```\nReason: The hook.Add function is the standard way to register a callback for event hooks like Think in Garry's Mod Lua.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\n    -- Callback body\nend)\n```\nReason: The hook.Add function is the standard way to register a callback for event hooks like Think in Garry's Mod Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":10185,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif IsValid(ent) then\n    -- Safe to call methods on ent here\nend\n```\nReason: The global `IsValid()` function checks that the variable is not nil and that the underlying C++ entity has not been destroyed or removed from the game world.","model_patch":"```lua\nif IsValid(ent) then\n    -- Safe to call methods on ent here\nend\n```\nReason: The global `IsValid()` function checks that the variable is not nil and that the underlying C++ entity has not been destroyed or removed from the game world."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9134,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here\nend)\n```\nReason: The net.Receive function is the standard Garry's Mod API for registering a callback function to handle incoming network messages.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- Handle the incoming message here\nend)\n```\nReason: The net.Receive function is the standard Garry's Mod API for registering a callback function to handle incoming network messages."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17235,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cached_angle = Angle()\n\nlocal function HotPath()\n    cached_angle:Zero()\n    -- Modify and use cached_angle here\nend\n```\nReason: Pre-allocating an Angle object outside the loop and resetting it with :Zero() avoids continuous memory allocations and garbage collection overhead.","model_patch":"```lua\nlocal cached_angle = Angle()\n\nlocal function HotPath()\n    cached_angle:Zero()\n    -- Modify and use cached_angle here\nend\n```\nReason: Pre-allocating an Angle object outside the loop and resetting it with :Zero() avoids continuous memory allocations and garbage collection overhead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11369,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal myaddon_config_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyAddonPaint\", function()\n    surface.SetDrawColor(myaddon_config_color)\nend)\n```\nReason: Local variables map directly to fast virtual registers in LuaJIT, avoiding the multiple expensive hash table lookups required when reading from nested tables.","model_patch":"```lua\nlocal myaddon_config_color = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyAddonPaint\", function()\n    surface.SetDrawColor(myaddon_config_color)\nend)\n```\nReason: Local variables map directly to fast virtual registers in LuaJIT, avoiding the multiple expensive hash table lookups required when reading from nested tables."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":16100,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system (DarkRPVars) instead of standard NWStrings to reduce bandwidth and correctly handle custom job titles.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\nReason: DarkRP uses its own optimized networking system (DarkRPVars) instead of standard NWStrings to reduce bandwidth and correctly handle custom job titles."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11075,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal isWithinRange = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: Using DistToSqr compares squared distances, avoiding the computationally expensive square root calculation required by the standard Distance method.","model_patch":"```lua\nlocal isWithinRange = vec1:DistToSqr(vec2) < (threshold * threshold)\n```\nReason: Using DistToSqr compares squared distances, avoiding the computationally expensive square root calculation required by the standard Distance method."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11114,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- Do something with 'ent' here\nend\n```\nReason: `ents.Iterator()` is the modern, officially recommended zero-allocation iterator that is much faster and more memory-efficient than `ipairs(ents.GetAll())` because it avoids constructing a new table on every call.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- Do something with 'ent' here\nend\n```\nReason: `ents.Iterator()` is the modern, officially recommended zero-allocation iterator that is much faster and more memory-efficient than `ipairs(ents.GetAll())` because it avoids constructing a new table on every call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":12363,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal radius = 256\nlocal entities = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #entities do\n    local ent = entities[i]\n    if IsValid(ent) and ent ~= ply then\n        -- process nearby entity\n    end\nend\n```\nReason: `ents.FindInSphere` executes in C++ and leverages the Source engine's internal spatial partitioning (kd-tree), making it orders of magnitude faster than iterating all entities with distance checks in Lua.","model_patch":"```lua\nlocal radius = 256\nlocal entities = ents.FindInSphere(ply:GetPos(), radius)\n\nfor i = 1, #entities do\n    local ent = entities[i]\n    if IsValid(ent) and ent ~= ply then\n        -- process nearby entity\n    end\nend\n```\nReason: `ents.FindInSphere` executes in C++ and leverages the Source engine's internal spatial partitioning (kd-tree), making it orders of magnitude faster than iterating all entities with distance checks in Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17119,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local players = {}\n    local radiusSqr = radius * radius\n    \n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            players[#players + 1] = ply\n        end\n    end\n    \n    return players\nend\n```\nReason: Iterating through `player.GetAll()` using `DistToSqr` only evaluates the small number of connected players, completely bypassing the heavy table allocation and iteration overhead caused by `ents.FindInSphere` collecting every single prop, weapon, and entity in the radius.","model_patch":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local players = {}\n    local radiusSqr = radius * radius\n    \n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            players[#players + 1] = ply\n        end\n    end\n    \n    return players\nend\n```\nReason: Iterating through `player.GetAll()` using `DistToSqr` only evaluates the small number of connected players, completely bypassing the heavy table allocation and iteration overhead caused by `ents.FindInSphere` collecting every single prop, weapon, and entity in the radius."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10592,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\n    -- Loop body\nend\n```\nReason: The numeric for loop uses specialized bytecode instructions (FORPREP and FORLOOP) that handle the increment and condition check natively, avoiding the overhead of the separate addition, comparison, and jump instructions required by a while loop.","model_patch":"```lua\nfor i = 1, n do\n    -- Loop body\nend\n```\nReason: The numeric for loop uses specialized bytecode instructions (FORPREP and FORLOOP) that handle the increment and condition check natively, avoiding the overhead of the separate addition, comparison, and jump instructions required by a while loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14281,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"Tick\", \"ProcessAllPlayers\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n```\nReason: `hook.Run` has internal overhead from looking up and iterating through registered listener functions, so calling it once with a table of players is significantly faster than invoking it repeatedly inside a loop for each individual player.","model_patch":"```lua\nhook.Add(\"Tick\", \"ProcessAllPlayers\", function()\n    local players = player.GetAll()\n    hook.Run(\"CustomPlayerTick\", players)\nend)\n```\nReason: `hook.Run` has internal overhead from looking up and iterating through registered listener functions, so calling it once with a table of players is significantly faster than invoking it repeatedly inside a loop for each individual player."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":20340,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"OptimizedHealthDraw\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 100, 100, color_white)\n    draw.SimpleText(\"Shadow: \" .. hp, \"DermaDefault\", 101, 101, color_black)\n    surface.DrawRect(100, 120, hp, 20)\nend)\n```\nReason: Caching the health value in a local variable reduces expensive Lua-to-C++ boundary crossings from three down to one per frame.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"OptimizedHealthDraw\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    local hp = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 100, 100, color_white)\n    draw.SimpleText(\"Shadow: \" .. hp, \"DermaDefault\", 101, 101, color_black)\n    surface.DrawRect(100, 120, hp, 20)\nend)\n```\nReason: Caching the health value in a local variable reduces expensive Lua-to-C++ boundary crossings from three down to one per frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":17748,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cachedColor = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"OptimizedPaintLoop\", function()\n    surface.SetDrawColor(cachedColor)\n    surface.DrawRect(0, 0, 100, 100)\nend)\n```\nReason: Creating a Color object instantiates a new table, so caching it outside the render loop prevents continuous memory allocation and expensive garbage collection overhead every frame.","model_patch":"```lua\nlocal cachedColor = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"OptimizedPaintLoop\", function()\n    surface.SetDrawColor(cachedColor)\n    surface.DrawRect(0, 0, 100, 100)\nend)\n```\nReason: Creating a Color object instantiates a new table, so caching it outside the render loop prevents continuous memory allocation and expensive garbage collection overhead every frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12716,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\n```\nReason: Local variables in Lua are stored in fast registers, bypassing the overhead of a global hash table lookup on every loop iteration.","model_patch":"```lua\nlocal sin = math.sin\n```\nReason: Local variables in Lua are stored in fast registers, bypassing the overhead of a global hash table lookup on every loop iteration."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":24474,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\n```\nReason: Caching the global function in a local variable prevents an expensive hash table lookup in the global environment (_G) on every call.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\n```\nReason: Caching the global function in a local variable prevents an expensive hash table lookup in the global environment (_G) on every call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":13076,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function AreLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or -0.8\n    return ply1:GetAimVector():Dot(ply2:GetAimVector()) < threshold\nend\n```\nReason: The dot product of two normalized vectors is highly performant and approaches -1 as the vectors point in opposing directions, entirely avoiding expensive trigonometric operations.","model_patch":"```lua\nlocal function AreLookingAtEachOther(ply1, ply2, threshold)\n    threshold = threshold or -0.8\n    return ply1:GetAimVector():Dot(ply2:GetAimVector()) < threshold\nend\n```\nReason: The dot product of two normalized vectors is highly performant and approaches -1 as the vectors point in opposing directions, entirely avoiding expensive trigonometric operations."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11291,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nSomeHelper(ply)\n```\nReason: Calling a standalone function directly avoids the performance overhead of the table/metatable index lookup required by the object-oriented method call syntax.","model_patch":"```lua\nSomeHelper(ply)\n```\nReason: Calling a standalone function directly avoids the performance overhead of the table/metatable index lookup required by the object-oriented method call syntax."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11340,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nMsgN(\"Your debug message here\")\n```\nReason: MsgN is a direct C-binding that avoids the overhead of Lua's global print wrapper, which performs unnecessary formatting and tostring conversions before outputting.","model_patch":"```lua\nMsgN(\"Your debug message here\")\n```\nReason: MsgN is a direct C-binding that avoids the overhead of Lua's global print wrapper, which performs unnecessary formatting and tostring conversions before outputting."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12677,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops avoid the overhead of iterator functions like pairs and ipairs, and are heavily optimized by LuaJIT in Garry's Mod.","model_patch":"```lua\nfor i = 1, #tbl do\n    local val = tbl[i]\nend\n```\nReason: Numeric for loops avoid the overhead of iterator functions like pairs and ipairs, and are heavily optimized by LuaJIT in Garry's Mod."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12806,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function fastFilterMap(tbl, filterFunc, mapFunc)\n    local result = {}\n    local count = 1\n    for i = 1, #tbl do\n        local val = tbl[i]\n        if filterFunc(val) then\n            result[count] = mapFunc(val)\n            count = count + 1\n        end\n    end\n    return result\nend\n```\nReason: A single imperative loop with manual array indexing avoids the intermediate table allocations, closure creation, and nested function call overheads inherent in functional combinator libraries like `fn`.","model_patch":"```lua\nlocal function fastFilterMap(tbl, filterFunc, mapFunc)\n    local result = {}\n    local count = 1\n    for i = 1, #tbl do\n        local val = tbl[i]\n        if filterFunc(val) then\n            result[count] = mapFunc(val)\n            count = count + 1\n        end\n    end\n    return result\nend\n```\nReason: A single imperative loop with manual array indexing avoids the intermediate table allocations, closure creation, and nested function call overheads inherent in functional combinator libraries like `fn`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":14760,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cached_players = player.GetAll()\n\nlocal function UpdatePlayerCache()\n    cached_players = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers_Join\", UpdatePlayerCache)\nhook.Add(\"PlayerDisconnected\", \"CachePlayers_Leave\", function()\n    -- timer.Simple(0) is needed because the player is still in player.GetAll() during the disconnect hook\n    timer.Simple(0, UpdatePlayerCache)\nend)\n\nhook.Add(\"Think\", \"Optimized_Think\", function()\n    -- A numeric for loop is slightly faster than ipairs\n    for i = 1, #cached_players do\n        local ply = cached_players[i]\n        if IsValid(ply) then\n            -- Do something with ply here\n        end\n    end\nend)\n```\nReason: Calling `player.GetAll()` every tick creates a new table which causes significant garbage collection overhead, whereas caching it on join/leave and iterating with a numeric for loop avoids per-tick memory allocations and is computationally faster.","model_patch":"```lua\nlocal cached_players = player.GetAll()\n\nlocal function UpdatePlayerCache()\n    cached_players = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayers_Join\", UpdatePlayerCache)\nhook.Add(\"PlayerDisconnected\", \"CachePlayers_Leave\", function()\n    -- timer.Simple(0) is needed because the player is still in player.GetAll() during the disconnect hook\n    timer.Simple(0, UpdatePlayerCache)\nend)\n\nhook.Add(\"Think\", \"Optimized_Think\", function()\n    -- A numeric for loop is slightly faster than ipairs\n    for i = 1, #cached_players do\n        local ply = cached_players[i]\n        if IsValid(ply) then\n            -- Do something with ply here\n        end\n    end\nend)\n```\nReason: Calling `player.GetAll()` every tick creates a new table which causes significant garbage collection overhead, whereas caching it on join/leave and iterating with a numeric for loop avoids per-tick memory allocations and is computationally faster."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13905,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal playerData = {}\n\n-- Write\nplayerData[ply] = \"value\"\n\n-- Fast read\nlocal data = playerData[ply]\n```\nReason: Indexing a local Lua table with the player object bypasses the expensive `__index` metamethod overhead of userdata.","model_patch":"```lua\nlocal playerData = {}\n\n-- Write\nplayerData[ply] = \"value\"\n\n-- Fast read\nlocal data = playerData[ply]\n```\nReason: Indexing a local Lua table with the player object bypasses the expensive `__index` metamethod overhead of userdata."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12102,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal fast_collection = {\n    \"item_one\",\n    \"item_two\",\n    \"item_three\"\n}\n\nfor i = 1, #fast_collection do\n    local value = fast_collection[i]\n    -- Iteration logic here\nend\n```\nReason: Sequential number-indexed arrays are stored in the contiguous array part of Lua's table structure, allowing a numeric for-loop to access elements directly by index without the overhead of hash lookups required by `pairs()`.","model_patch":"```lua\nlocal fast_collection = {\n    \"item_one\",\n    \"item_two\",\n    \"item_three\"\n}\n\nfor i = 1, #fast_collection do\n    local value = fast_collection[i]\n    -- Iteration logic here\nend\n```\nReason: Sequential number-indexed arrays are stored in the contiguous array part of Lua's table structure, allowing a numeric for-loop to access elements directly by index without the overhead of hash lookups required by `pairs()`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9129,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate primitive numbers avoids the table allocation and field lookup overhead associated with Color objects in a hot loop.","model_patch":"```lua\nsurface.SetDrawColor(255, 255, 255, 255)\n```\nReason: Passing separate primitive numbers avoids the table allocation and field lookup overhead associated with Color objects in a hot loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8589,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:0:123456'\")\nif result then\n    PrintTable(result)\nelseif result == false then\n    print(\"SQL Error: \" .. sql.LastError())\nend\n```\nReason: Local SQLite avoids the network round-trip overhead inherent to remote MySQL, resulting in lower latency for reads and writes on a single server.","model_patch":"```lua\nlocal result = sql.Query(\"SELECT * FROM player_data WHERE steamid = 'STEAM_0:0:123456'\")\nif result then\n    PrintTable(result)\nelseif result == false then\n    print(\"SQL Error: \" .. sql.LastError())\nend\n```\nReason: Local SQLite avoids the network round-trip overhead inherent to remote MySQL, resulting in lower latency for reads and writes on a single server."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":10591,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetCachedSteamID(ply)\n    if not ply.CachedSteamID then\n        ply.CachedSteamID = ply:SteamID()\n    end\n    return ply.CachedSteamID\nend\n```\nReason: Accessing a Lua table field is significantly faster than calling a C++ engine function because it avoids the overhead of crossing the Lua-C boundary.","model_patch":"```lua\nlocal function GetCachedSteamID(ply)\n    if not ply.CachedSteamID then\n        ply.CachedSteamID = ply:SteamID()\n    end\n    return ply.CachedSteamID\nend\n```\nReason: Accessing a Lua table field is significantly faster than calling a C++ engine function because it avoids the overhead of crossing the Lua-C boundary."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":11012,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece_data_\" .. i\nend\nlocal largeString = table.concat(pieces)\n```\nReason: Using `table.concat` builds the final string in a single pass, avoiding the O(N^2) performance cost and heavy garbage collection overhead of creating thousands of intermediate strings with the `..` operator.","model_patch":"```lua\nlocal pieces = {}\nfor i = 1, 10000 do\n    pieces[i] = \"piece_data_\" .. i\nend\nlocal largeString = table.concat(pieces)\n```\nReason: Using `table.concat` builds the final string in a single pass, avoiding the O(N^2) performance cost and heavy garbage collection overhead of creating thousands of intermediate strings with the `..` operator."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13743,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Calling surface.DrawRect directly avoids the Lua function overhead of draw.RoundedBox and its internal conditional check for a radius of zero.","model_patch":"```lua\nsurface.SetDrawColor(r, g, b, a)\nsurface.DrawRect(x, y, w, h)\n```\nReason: Calling surface.DrawRect directly avoids the Lua function overhead of draw.RoundedBox and its internal conditional check for a radius of zero."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12541,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"FastestTextDraw\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(\"This is a fast single-line string\")\nend)\n```\nReason: Calling the surface.* functions directly is faster because it completely bypasses the Lua-side function overhead, alignment mathematics, and newline parsing that the draw.* library wrappers perform on every frame.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"FastestTextDraw\", function()\n    surface.SetFont(\"DermaDefault\")\n    surface.SetTextColor(255, 255, 255, 255)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(\"This is a fast single-line string\")\nend)\n```\nReason: Calling the surface.* functions directly is faster because it completely bypasses the Lua-side function overhead, alignment mathematics, and newline parsing that the draw.* library wrappers perform on every frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8882,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n#myTable\n```\nReason: The `#` operator is the native, fastest, and most standard way to get the length of sequential array-like tables in Lua.","model_patch":"```lua\n#myTable\n```\nReason: The `#` operator is the native, fastest, and most standard way to get the length of sequential array-like tables in Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11981,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nt = {}\n```\nReason: Assigning a new empty table is a fast O(1) operation that leaves the old table to be garbage collected, whereas table.Empty() must iterate over every key in the table to set it to nil, taking O(N) time.","model_patch":"```lua\nt = {}\n```\nReason: Assigning a new empty table is a fast O(1) operation that leaves the old table to be garbage collected, whereas table.Empty() must iterate over every key in the table to set it to nil, taking O(N) time."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11010,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true\n}\n\nif mySet[\"banana\"] then\n    -- Value exists\nend\n```\nReason: Direct key lookups in Lua tables provide O(1) constant time complexity, whereas table.HasValue performs an O(n) linear search.","model_patch":"```lua\nlocal mySet = {\n    [\"apple\"] = true,\n    [\"banana\"] = true,\n    [\"orange\"] = true\n}\n\nif mySet[\"banana\"] then\n    -- Value exists\nend\n```\nReason: Direct key lookups in Lua tables provide O(1) constant time complexity, whereas table.HasValue performs an O(n) linear search."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10747,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal myTable = { a = 1, b = 2, c = 3 }\n```\nReason: Defining fields within the table constructor allows Lua to pre-allocate the hash part of the table to the exact size needed, avoiding the performance overhead of multiple memory reallocations that occur when adding fields sequentially.","model_patch":"```lua\nlocal myTable = { a = 1, b = 2, c = 3 }\n```\nReason: Defining fields within the table constructor allows Lua to pre-allocate the hash part of the table to the exact size needed, avoiding the performance overhead of multiple memory reallocations that occur when adding fields sequentially."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11340,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal randomElement = myTable[math.random(#myTable)]\n```\nReason: Using the length operator (#) with math.random provides direct O(1) index access, avoiding the O(n) iteration overhead of table.Random's pairs loop.","model_patch":"```lua\nlocal randomElement = myTable[math.random(#myTable)]\n```\nReason: Using the length operator (#) with math.random provides direct O(1) index access, avoiding the O(n) iteration overhead of table.Random's pairs loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9653,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nx * x\n```\nReason: Direct multiplication is faster than the exponentiation operator (`x ^ 2`) or `math.pow` in LuaJIT because it compiles to a simpler, more highly optimized instruction and avoids function call overhead.","model_patch":"```lua\nx * x\n```\nReason: Direct multiplication is faster than the exponentiation operator (`x ^ 2`) or `math.pow` in LuaJIT because it compiles to a simpler, more highly optimized instruction and avoids function call overhead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Gemini 3.1 Pro (High)","model_name_or_path":"Gemini 3.1 Pro (High)","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":10275,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: Using `ipairs` is more performant than `pairs` because `player.GetAll()` returns a sequentially indexed table.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- your code here\nend\n```\nReason: Using `ipairs` is more performant than `pairs` because `player.GetAll()` returns a sequentially indexed table."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7107,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    print(ent)\nend\n```\n\nReason: `ents.FindByClass` queries the engine directly for entities matching the given class name, returning only those entities without you ever constructing a table of every entity in the map via `ents.GetAll()`.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    print(ent)\nend\n```\n\nReason: `ents.FindByClass` queries the engine directly for entities matching the given class name, returning only those entities without you ever constructing a table of every entity in the map via `ents.GetAll()`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":6711,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add( \"Think\", \"MyAddon.Think\", function()\nend )\n```\n\nReason: `hook.Add` registers a callback on a named GMod hook; the first argument is the hook name (`\"Think\"`), the second is a unique identifier (`\"MyAddon.Think\"`) used to reference or remove this specific callback later, and the third is the function to run each tick.","model_patch":"```lua\nhook.Add( \"Think\", \"MyAddon.Think\", function()\nend )\n```\n\nReason: `hook.Add` registers a callback on a named GMod hook; the first argument is the hook name (`\"Think\"`), the second is a unique identifier (`\"MyAddon.Think\"`) used to reference or remove this specific callback later, and the third is the function to run each tick."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":8327,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\n\nReason: `IsValid()` is the idiomatic GMod helper that returns `false` for both `nil` and `NULL` (the engine's invalid-entity sentinel), covering the common cases where `ent` was never set, was garbage-collected, or the entity was removed from the world — whereas a plain `if ent` or `ent ~= nil` check would not catch the `NULL` entity case and could cause a runtime error when a method is called on a stale reference.","model_patch":"```lua\nif IsValid(ent) then\n    ent:SomeMethod()\nend\n```\n\nReason: `IsValid()` is the idiomatic GMod helper that returns `false` for both `nil` and `NULL` (the engine's invalid-entity sentinel), covering the common cases where `ent` was never set, was garbage-collected, or the entity was removed from the world — whereas a plain `if ent` or `ent ~= nil` check would not catch the `NULL` entity case and could cause a runtime error when a method is called on a stale reference."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8222,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- ply is the player who sent the message (server-side only; nil on client)\n    local someValue = net.ReadString()\n    print(\"[MyAddon] Received Sync from\", ply, \"- value:\", someValue)\nend)\n```\n\nReason: `net.Receive` is the standard GMod function that binds a callback to a named net message; the callback fires automatically whenever a message with that exact name arrives, receiving the message length in bits and (on the server) the sending player as arguments.","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- ply is the player who sent the message (server-side only; nil on client)\n    local someValue = net.ReadString()\n    print(\"[MyAddon] Received Sync from\", ply, \"- value:\", someValue)\nend)\n```\n\nReason: `net.Receive` is the standard GMod function that binds a callback to a named net message; the callback fires automatically whenever a message with that exact name arrives, receiving the message length in bits and (on the server) the sending player as arguments."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12475,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Slower: allocates a new userdata object every call\nlocal function hotPathSlow()\n    local ang = Angle(0, 0, 0)\n    -- use ang...\nend\n\n-- Faster: allocate once, zero it in-place each call\nlocal _scratchAng = Angle(0, 0, 0)\n\nlocal function hotPathFast()\n    _scratchAng:Zero()\n    local ang = _scratchAng\n    -- use ang...\nend\n```\n\nReason: `Angle()` allocates a new userdata object on every call, incurring GC pressure and heap allocation cost; reusing a single pre-allocated `Angle` and calling `:Zero()` on it mutates the existing object in-place with no allocation, which is significantly cheaper in a hot path.","model_patch":"```lua\n-- Slower: allocates a new userdata object every call\nlocal function hotPathSlow()\n    local ang = Angle(0, 0, 0)\n    -- use ang...\nend\n\n-- Faster: allocate once, zero it in-place each call\nlocal _scratchAng = Angle(0, 0, 0)\n\nlocal function hotPathFast()\n    _scratchAng:Zero()\n    local ang = _scratchAng\n    -- use ang...\nend\n```\n\nReason: `Angle()` allocates a new userdata object on every call, incurring GC pressure and heap allocation cost; reusing a single pre-allocated `Angle` and calling `:Zero()` on it mutates the existing object in-place with no allocation, which is significantly cheaper in a hot path."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8791,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Preferred: flat local variable (module-level or upvalue)\nlocal color = Color(255, 128, 0)\n\n-- Read:\nlocal c = color\n```\n\nReason: Local variables in Lua are stored as upvalues or stack slots and accessed via direct array indexing in the VM, whereas nested table lookups (`myaddon.config.color`) require two sequential hash-table traversals plus the global `myaddon` lookup first — each a separate `GETTABLE` opcode — making a flat `local` 3–5× faster per read in tight loops.","model_patch":"```lua\n-- Preferred: flat local variable (module-level or upvalue)\nlocal color = Color(255, 128, 0)\n\n-- Read:\nlocal c = color\n```\n\nReason: Local variables in Lua are stored as upvalues or stack slots and accessed via direct array indexing in the VM, whereas nested table lookups (`myaddon.config.color`) require two sequential hash-table traversals plus the global `myaddon` lookup first — each a separate `GETTABLE` opcode — making a flat `local` 3–5× faster per read in tight loops."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9500,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nply:getDarkRPVar(\"job\")\n```\n\nReason: `getDarkRPVar(\"job\")` is the official DarkRP accessor for networked RP variables — it reads from DarkRP's own sync layer rather than raw NW strings, making it more reliable, version-stable, and consistent with how DarkRP itself exposes job data internally.","model_patch":"```lua\nply:getDarkRPVar(\"job\")\n```\n\nReason: `getDarkRPVar(\"job\")` is the official DarkRP accessor for networked RP variables — it reads from DarkRP's own sync layer rather than raw NW strings, making it more reliable, version-stable, and consistent with how DarkRP itself exposes job data internally."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8165,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif vec1:DistToSqr(vec2) < threshold * threshold then\n    -- vectors are within range\nend\n```\n\nReason: `Vector:DistToSqr()` returns the squared distance and skips the expensive `math.sqrt` call that `Vector:Distance()` performs internally, so squaring your threshold constant is far cheaper than computing a true Euclidean distance every tick.","model_patch":"```lua\nif vec1:DistToSqr(vec2) < threshold * threshold then\n    -- vectors are within range\nend\n```\n\nReason: `Vector:DistToSqr()` returns the squared distance and skips the expensive `math.sqrt` call that `Vector:Distance()` performs internally, so squaring your threshold constant is far cheaper than computing a true Euclidean distance every tick."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9554,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    print(ent)\nend\n```\n\nReason: `ents.Iterator()` is the GMod wiki-recommended efficient alternative to `ents.GetAll()` because it returns a stateless iterator over the internal entity list directly, avoiding the overhead of allocating and populating a new table copy on every call.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    print(ent)\nend\n```\n\nReason: `ents.Iterator()` is the GMod wiki-recommended efficient alternative to `ents.GetAll()` because it returns a stateless iterator over the internal entity list directly, avoiding the overhead of allocating and populating a new table copy on every call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":10114,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local pos = ply:GetPos()\n    return ents.FindInSphere(pos, radius)\nend\n\n-- Usage\nlocal nearby = GetNearbyEntities(player.GetByID(1), 512)\nfor _, ent in ipairs(nearby) do\n    print(ent, ent:GetPos())\nend\n```\n\nReason: `ents.FindInSphere` performs a simple origin-distance check entirely in C++ against the engine's entity list, making it faster than `FindInPVS` (which walks BSP visibility sets) and `FindInBox` (which does the same sphere-vs-AABB test but with an extra rectangular cull step that can be slower for radius-based queries); benchmarks consistently show `FindInSphere` as the lowest-overhead option for \"entities within X units of a point.\"","model_patch":"```lua\nlocal function GetNearbyEntities(ply, radius)\n    local pos = ply:GetPos()\n    return ents.FindInSphere(pos, radius)\nend\n\n-- Usage\nlocal nearby = GetNearbyEntities(player.GetByID(1), 512)\nfor _, ent in ipairs(nearby) do\n    print(ent, ent:GetPos())\nend\n```\n\nReason: `ents.FindInSphere` performs a simple origin-distance check entirely in C++ against the engine's entity list, making it faster than `FindInPVS` (which walks BSP visibility sets) and `FindInBox` (which does the same sphere-vs-AABB test but with an extra rectangular cull step that can be slower for radius-based queries); benchmarks consistently show `FindInSphere` as the lowest-overhead option for \"entities within X units of a point.\""}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10297,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n    return result\nend\n```\n\nReason: `player.GetAll()` returns only the small, fixed-size player list (≤128 entries) so the loop is O(players), whereas `ents.FindInSphere` must traverse the engine's full spatial broadphase over every entity in the map before you even begin filtering — making the direct player iteration significantly cheaper when the entity count is high.","model_patch":"```lua\nlocal function GetPlayersInRadius(pos, radius)\n    local radiusSqr = radius * radius\n    local result = {}\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= radiusSqr then\n            result[#result + 1] = ply\n        end\n    end\n    return result\nend\n```\n\nReason: `player.GetAll()` returns only the small, fixed-size player list (≤128 entries) so the loop is O(players), whereas `ents.FindInSphere` must traverse the engine's full spatial broadphase over every entity in the map before you even begin filtering — making the direct player iteration significantly cheaper when the entity count is high."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9717,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\n    -- body\nend\n```\n\nReason: The numeric `for` loop is generally faster in Lua (including GLua) because the VM compiles it to dedicated `FORPREP`/`FORLOOP` opcodes that keep the counter, limit, and step in registers and branch with a single instruction, whereas a `while` loop requires explicit `i = i + 1` and `i <= n` expressions that each emit separate opcodes (ADD, LE, JMP), adding per-iteration overhead.","model_patch":"```lua\nfor i = 1, n do\n    -- body\nend\n```\n\nReason: The numeric `for` loop is generally faster in Lua (including GLua) because the VM compiles it to dedicated `FORPREP`/`FORLOOP` opcodes that keep the counter, limit, and step in registers and branch with a single instruction, whereas a `while` loop requires explicit `i = i + 1` and `i <= n` expressions that each emit separate opcodes (ADD, LE, JMP), adding per-iteration overhead."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":14251,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- FASTER: Call hook.Run once, passing the full player table\nlocal players = player.GetAll()\n\nhook.Add(\"Think\", \"NotifyAllPlayers_Fast\", function()\n    hook.Run(\"OnPlayersTick\", players)\nend)\n\nhook.Add(\"OnPlayersTick\", \"CustomLogic_Fast\", function(plys)\n    for i = 1, #plys do\n        -- process plys[i]\n    end\nend)\n\n-- SLOWER: Call hook.Run once per player inside the loop\nhook.Add(\"Think\", \"NotifyAllPlayers_Slow\", function()\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        hook.Run(\"OnPlayerTick\", plys[i])  -- hook dispatch overhead × N players\n    end\nend)\n```\n\nReason: `hook.Run` carries fixed dispatch overhead (iterating the hook table, doing string lookups, and calling each registered listener) on every invocation — calling it once and passing all players incurs that overhead only once per tick, whereas calling it N times inside a player loop multiplies that overhead by the player count each tick.","model_patch":"```lua\n-- FASTER: Call hook.Run once, passing the full player table\nlocal players = player.GetAll()\n\nhook.Add(\"Think\", \"NotifyAllPlayers_Fast\", function()\n    hook.Run(\"OnPlayersTick\", players)\nend)\n\nhook.Add(\"OnPlayersTick\", \"CustomLogic_Fast\", function(plys)\n    for i = 1, #plys do\n        -- process plys[i]\n    end\nend)\n\n-- SLOWER: Call hook.Run once per player inside the loop\nhook.Add(\"Think\", \"NotifyAllPlayers_Slow\", function()\n    local plys = player.GetAll()\n    for i = 1, #plys do\n        hook.Run(\"OnPlayerTick\", plys[i])  -- hook dispatch overhead × N players\n    end\nend)\n```\n\nReason: `hook.Run` carries fixed dispatch overhead (iterating the hook table, doing string lookups, and calling each registered listener) on every invocation — calling it once and passing all players incurs that overhead only once per tick, whereas calling it N times inside a player loop multiplies that overhead by the player count each tick."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9864,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"ExampleHUD\", function()\n    local ply = LocalPlayer()\n    local hp  = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 20, 20, Color(255, 255, 255))\n    draw.RoundedBox(4, 20, 40, hp * 2, 16, Color(200, 50, 50))\n    draw.SimpleText(hp .. \" / 100\", \"DermaDefault\", 20, 60, Color(255, 255, 255))\nend)\n```\n\nReason: `LocalPlayer()` performs a global table lookup and `Health()` crosses the C++/Lua boundary on every call, so caching both results in locals at the top of the frame eliminates two redundant C-side round-trips and two redundant global lookups, reducing per-frame overhead to a single call of each.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"ExampleHUD\", function()\n    local ply = LocalPlayer()\n    local hp  = ply:Health()\n\n    draw.SimpleText(\"Health: \" .. hp, \"DermaDefault\", 20, 20, Color(255, 255, 255))\n    draw.RoundedBox(4, 20, 40, hp * 2, 16, Color(200, 50, 50))\n    draw.SimpleText(hp .. \" / 100\", \"DermaDefault\", 20, 60, Color(255, 255, 255))\nend)\n```\n\nReason: `LocalPlayer()` performs a global table lookup and `Health()` crosses the C++/Lua boundary on every call, so caching both results in locals at the top of the frame eliminates two redundant C-side round-trips and two redundant global lookups, reducing per-frame overhead to a single call of each."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8258,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Cache the color once, outside the paint hook\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyPaintHook\", function()\n    draw.SimpleText(\"Hello\", \"DermaDefault\", 100, 100, white)\nend)\n```\n\nReason: `Color()` allocates a new table on every call; storing the result in a `local` upvalue outside the hook creates it once and reuses the same table each frame, eliminating per-frame garbage and GC pressure.","model_patch":"```lua\n-- Cache the color once, outside the paint hook\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyPaintHook\", function()\n    draw.SimpleText(\"Hello\", \"DermaDefault\", 100, 100, white)\nend)\n```\n\nReason: `Color()` allocates a new table on every call; storing the result in a `local` upvalue outside the hook creates it once and reuses the same table each frame, eliminating per-frame garbage and GC pressure."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9312,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\n\nlocal function computeWave(points, t)\n    for i = 1, #points do\n        points[i] = sin(i * t)\n    end\nend\n```\n\nReason: Localizing `math.sin` into a local variable avoids the global table lookup (`_G[\"math\"][\"sin\"]`) on every iteration — local variables are stored in VM registers and resolved in O(1) with a single `GETLOCAL` opcode, whereas each `math.sin` access performs two hash-table lookups (`math` in `_G`, then `sin` in the math table), which adds measurable overhead inside a tight loop.","model_patch":"```lua\nlocal sin = math.sin\n\nlocal function computeWave(points, t)\n    for i = 1, #points do\n        points[i] = sin(i * t)\n    end\nend\n```\n\nReason: Localizing `math.sin` into a local variable avoids the global table lookup (`_G[\"math\"][\"sin\"]`) on every iteration — local variables are stored in VM registers and resolved in O(1) with a single `GETLOCAL` opcode, whereas each `math.sin` access performs two hash-table lookups (`math` in `_G`, then `sin` in the math table), which adds measurable overhead inside a tight loop."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9988,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"example_think\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply freely without calling LocalPlayer() again\n    local pos  = ply:GetPos()\n    local vel  = ply:GetVelocity()\n    local hp   = ply:Health()\nend)\n```\n\nReason: Declaring `local LocalPlayer = LocalPlayer` at the top of the file hoists the global function into a upvalue, so every subsequent call resolves through the faster local/upvalue lookup (a single array index into the function's upvalue list) instead of a full `_G` table hash-lookup each time; inside the hook the result is further stored in `ply` so the function itself is only invoked once per frame rather than once per use-site.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"example_think\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- Use ply freely without calling LocalPlayer() again\n    local pos  = ply:GetPos()\n    local vel  = ply:GetVelocity()\n    local hp   = ply:Health()\nend)\n```\n\nReason: Declaring `local LocalPlayer = LocalPlayer` at the top of the file hoists the global function into a upvalue, so every subsequent call resolves through the faster local/upvalue lookup (a single array index into the function's upvalue list) instead of a full `_G` table hash-lookup each time; inside the hook the result is further stored in `ply` so the function itself is only invoked once per frame rather than once per use-site."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":12694,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Returns true if two players are roughly facing each other.\n-- threshold: dot product cutoff, e.g. 0.8 ≈ within ~37° of directly facing\nlocal function FacingEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.8\n\n    local eye1 = ply1:EyePos()\n    local eye2 = ply2:EyePos()\n\n    -- Unit aim vectors (GetAimVector returns a normalised direction)\n    local fwd1 = ply1:GetAimVector()\n    local fwd2 = ply2:GetAimVector()\n\n    -- Direction FROM ply1 TO ply2, normalised\n    local to2 = (eye2 - eye1):GetNormalized()\n\n    -- ply1 must be aiming roughly toward ply2 ...\n    if fwd1:Dot(to2) < threshold then return false end\n\n    -- ... and ply2 must be aiming roughly toward ply1\n    -- (to1 == -to2, so negate the dot product)\n    if fwd2:Dot(-to2) < threshold then return false end\n\n    return true\nend\n\n-- Example usage\nif FacingEachOther(ply1, ply2, 0.85) then\n    print(\"Players are looking at each other!\")\nend\n```\n\nReason: `GetAimVector()` already returns a unit vector, so two cheap dot products suffice — one checks that player 1's aim aligns with the direction *to* player 2, and one checks that player 2's aim aligns with the direction *back* to player 1 (i.e. `-to2`); both comparisons are pure multiplications and additions with no trigonometry, making this significantly faster than computing `math.acos` of the angle between aim vectors.","model_patch":"```lua\n-- Returns true if two players are roughly facing each other.\n-- threshold: dot product cutoff, e.g. 0.8 ≈ within ~37° of directly facing\nlocal function FacingEachOther(ply1, ply2, threshold)\n    threshold = threshold or 0.8\n\n    local eye1 = ply1:EyePos()\n    local eye2 = ply2:EyePos()\n\n    -- Unit aim vectors (GetAimVector returns a normalised direction)\n    local fwd1 = ply1:GetAimVector()\n    local fwd2 = ply2:GetAimVector()\n\n    -- Direction FROM ply1 TO ply2, normalised\n    local to2 = (eye2 - eye1):GetNormalized()\n\n    -- ply1 must be aiming roughly toward ply2 ...\n    if fwd1:Dot(to2) < threshold then return false end\n\n    -- ... and ply2 must be aiming roughly toward ply1\n    -- (to1 == -to2, so negate the dot product)\n    if fwd2:Dot(-to2) < threshold then return false end\n\n    return true\nend\n\n-- Example usage\nif FacingEachOther(ply1, ply2, 0.85) then\n    print(\"Players are looking at each other!\")\nend\n```\n\nReason: `GetAimVector()` already returns a unit vector, so two cheap dot products suffice — one checks that player 1's aim aligns with the direction *to* player 2, and one checks that player 2's aim aligns with the direction *back* to player 1 (i.e. `-to2`); both comparisons are pure multiplications and additions with no trigonometry, making this significantly faster than computing `math.acos` of the angle between aim vectors."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8037,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nSomeHelper(ply)\n```\n\nReason: In Lua, `ply:SomeHelper()` is syntactic sugar for `ply.SomeHelper(ply)`, which requires a table field lookup on `ply`'s metatable chain at runtime, whereas `SomeHelper(ply)` (a plain global or upvalue reference) skips that lookup entirely — making the free-function style faster, especially if `SomeHelper` is stored as a local upvalue (`local SomeHelper = SomeHelper`).","model_patch":"```lua\nSomeHelper(ply)\n```\n\nReason: In Lua, `ply:SomeHelper()` is syntactic sugar for `ply.SomeHelper(ply)`, which requires a table field lookup on `ply`'s metatable chain at runtime, whereas `SomeHelper(ply)` (a plain global or upvalue reference) skips that lookup entirely — making the free-function style faster, especially if `SomeHelper` is stored as a local upvalue (`local SomeHelper = SomeHelper`)."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13387,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nMsgN(\"debug value: \", someVar)\n```\n\nReason: `MsgN` is a C-side function that writes directly to the console output with a newline, bypassing the overhead of `print`'s Lua-level wrapper which calls `tostring()` on every argument, concatenates them with tab separators, and routes through additional indirection — making `MsgN` (or `Msg` without a newline) meaningfully cheaper in a hot path.","model_patch":"```lua\nMsgN(\"debug value: \", someVar)\n```\n\nReason: `MsgN` is a C-side function that writes directly to the console output with a newline, bypassing the overhead of `print`'s Lua-level wrapper which calls `tostring()` on every argument, concatenates them with tab separators, and routes through additional indirection — making `MsgN` (or `Msg` without a newline) meaningfully cheaper in a hot path."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10281,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal t = {1, 2, 3, 4, 5} -- large sequential array\n\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\n\nReason: The numeric `for` loop with `#t` is fastest because it avoids the overhead of iterator function calls (closures + coroutine state) that `ipairs` incurs on every step, and avoids the full hash + array traversal with unordered/unpredictable key enumeration that `pairs` uses; direct index access `t[i]` is a raw table lookup with no extra function call overhead per iteration, making it the lowest-cost option in LuaJIT (which GMod uses via Garry's Mod's Lua 5.1 with LuaJIT), where the JIT can also optimise the simple integer increment loop far more aggressively than iterator-based loops.","model_patch":"```lua\nlocal t = {1, 2, 3, 4, 5} -- large sequential array\n\nfor i = 1, #t do\n    local v = t[i]\n    -- use v\nend\n```\n\nReason: The numeric `for` loop with `#t` is fastest because it avoids the overhead of iterator function calls (closures + coroutine state) that `ipairs` incurs on every step, and avoids the full hash + array traversal with unordered/unpredictable key enumeration that `pairs` uses; direct index access `t[i]` is a raw table lookup with no extra function call overhead per iteration, making it the lowest-cost option in LuaJIT (which GMod uses via Garry's Mod's Lua 5.1 with LuaJIT), where the JIT can also optimise the simple integer increment loop far more aggressively than iterator-based loops."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":14289,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- DarkRP fn library approach (slower: two passes, two intermediate tables, closure overhead)\n-- local result = fn.map(fn.filter(players, fn.IsValid), fn.getName)\n\n-- Faster: single-pass imperative loop — no intermediate tables, no closure allocation\nlocal function filterMap(tbl, filterFn, mapFn)\n    local out = {}\n    local n   = 0\n    for i = 1, #tbl do\n        local v = tbl[i]\n        if filterFn(v) then\n            n = n + 1\n            out[n] = mapFn(v)\n        end\n    end\n    return out\nend\n\n-- Example: get names of valid, alive players\nlocal names = filterMap(\n    player.GetAll(),\n    function(ply) return IsValid(ply) and ply:Alive() end,\n    function(ply) return ply:Nick() end\n)\n```\n\nReason: `fn.filter` + `fn.map` allocates two intermediate tables and iterates the list twice, and each combinator call carries Lua closure/upvalue overhead; the single-pass loop allocates one output table, avoids all intermediate storage, and keeps every operation in a tight numeric `for` with no extra function-call indirection, which is measurably faster in LuaJIT (GMod's runtime) because the inner loop can be traced and compiled without bailing out on vararg or metatables that the fn library relies on.","model_patch":"```lua\n-- DarkRP fn library approach (slower: two passes, two intermediate tables, closure overhead)\n-- local result = fn.map(fn.filter(players, fn.IsValid), fn.getName)\n\n-- Faster: single-pass imperative loop — no intermediate tables, no closure allocation\nlocal function filterMap(tbl, filterFn, mapFn)\n    local out = {}\n    local n   = 0\n    for i = 1, #tbl do\n        local v = tbl[i]\n        if filterFn(v) then\n            n = n + 1\n            out[n] = mapFn(v)\n        end\n    end\n    return out\nend\n\n-- Example: get names of valid, alive players\nlocal names = filterMap(\n    player.GetAll(),\n    function(ply) return IsValid(ply) and ply:Alive() end,\n    function(ply) return ply:Nick() end\n)\n```\n\nReason: `fn.filter` + `fn.map` allocates two intermediate tables and iterates the list twice, and each combinator call carries Lua closure/upvalue overhead; the single-pass loop allocates one output table, avoids all intermediate storage, and keeps every operation in a tight numeric `for` with no extra function-call indirection, which is measurably faster in LuaJIT (GMod's runtime) because the inner loop can be traced and compiled without bailing out on vararg or metatables that the fn library relies on."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11083,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Cached player list, rebuilt only on join/leave events\nlocal cachedPlayers = {}\n\nlocal function RebuildPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", RebuildPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", RebuildPlayerCache)\n\n-- Populate once on script load (e.g. on a live server reload)\nRebuildPlayerCache()\n\n-- Think/Tick hook iterates the pre-built cache instead of calling player.GetAll()\nhook.Add(\"Think\", \"MyFastThink\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- work with ply ...\n    end\nend)\n```\n\nReason: `player.GetAll()` allocates a new table and walks an internal linked-list every call; caching the result and rebuilding it only on `PlayerInitialSpawn`/`PlayerDisconnected` (which fire at most a handful of times per session) means the Think hook pays only the cost of a numeric `for` loop over an already-allocated table, eliminating per-tick allocation and list traversal entirely.","model_patch":"```lua\n-- Cached player list, rebuilt only on join/leave events\nlocal cachedPlayers = {}\n\nlocal function RebuildPlayerCache()\n    cachedPlayers = player.GetAll()\nend\n\nhook.Add(\"PlayerInitialSpawn\", \"PlayerCache_Add\", RebuildPlayerCache)\nhook.Add(\"PlayerDisconnected\", \"PlayerCache_Remove\", RebuildPlayerCache)\n\n-- Populate once on script load (e.g. on a live server reload)\nRebuildPlayerCache()\n\n-- Think/Tick hook iterates the pre-built cache instead of calling player.GetAll()\nhook.Add(\"Think\", \"MyFastThink\", function()\n    for i = 1, #cachedPlayers do\n        local ply = cachedPlayers[i]\n        -- work with ply ...\n    end\nend)\n```\n\nReason: `player.GetAll()` allocates a new table and walks an internal linked-list every call; caching the result and rebuilding it only on `PlayerInitialSpawn`/`PlayerDisconnected` (which fire at most a handful of times per session) means the Think hook pays only the cost of a numeric `for` loop over an already-allocated table, eliminating per-tick allocation and list traversal entirely."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"incorrect","detail":"Did not match a fixture answer pattern.","durationMs":11541,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal playerData = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayerData\", function(ply)\n    playerData[ply:EntIndex()] = {\n        stamina = 100,\n        lastAttack = 0,\n        score = 0,\n    }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanPlayerData\", function(ply)\n    playerData[ply:EntIndex()] = nil\nend)\n\n-- Write\nlocal function SetStamina(ply, val)\n    playerData[ply:EntIndex()].stamina = val\nend\n\n-- Read (hot path) — plain table lookup, no metamethod chain\nlocal function GetStamina(ply)\n    return playerData[ply:EntIndex()].stamina\nend\n```\n\nReason: `ply.someField` resolves through the `Player`/`Entity` metatable's `__index` metamethod on every access (a C-side lookup into the entity's Lua table), whereas a module-local table indexed by `EntIndex()` is a direct Lua array lookup with no metamethod overhead, making it significantly faster for values read in hot loops like `Think` hooks or per-tick systems.","model_patch":"```lua\nlocal playerData = {}\n\nhook.Add(\"PlayerInitialSpawn\", \"CachePlayerData\", function(ply)\n    playerData[ply:EntIndex()] = {\n        stamina = 100,\n        lastAttack = 0,\n        score = 0,\n    }\nend)\n\nhook.Add(\"PlayerDisconnected\", \"CleanPlayerData\", function(ply)\n    playerData[ply:EntIndex()] = nil\nend)\n\n-- Write\nlocal function SetStamina(ply, val)\n    playerData[ply:EntIndex()].stamina = val\nend\n\n-- Read (hot path) — plain table lookup, no metamethod chain\nlocal function GetStamina(ply)\n    return playerData[ply:EntIndex()].stamina\nend\n```\n\nReason: `ply.someField` resolves through the `Player`/`Entity` metatable's `__index` metamethod on every access (a C-side lookup into the entity's Lua table), whereas a module-local table indexed by `EntIndex()` is a direct Lua array lookup with no metamethod overhead, making it significantly faster for values read in hot loops like `Think` hooks or per-tick systems."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 1 candidate loops.","durationMs":10726,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Slower: string-keyed map (hash part) — pairs() has overhead per entry\nlocal map = { apple = 1, banana = 2, cherry = 3 }\nfor k, v in pairs(map) do\n    _ = v\nend\n\n-- Faster: sequential number-indexed array (array part) — ipairs() / numeric for uses raw slot access\nlocal arr = { 1, 2, 3 }\nfor i = 1, #arr do\n    _ = arr[i]\nend\n```\n\nReason: Lua tables are split internally into an **array part** (contiguous integer keys starting at 1) and a **hash part** (everything else, including string keys). Iterating the array part with a numeric `for` loop accesses values via direct slot indexing with no hashing, no key comparison, and no iterator closure overhead, making it significantly faster than `pairs()` over a string-keyed map, which must traverse the hash part's buckets and call the `next` metamethod on each step.","model_patch":"```lua\n-- Slower: string-keyed map (hash part) — pairs() has overhead per entry\nlocal map = { apple = 1, banana = 2, cherry = 3 }\nfor k, v in pairs(map) do\n    _ = v\nend\n\n-- Faster: sequential number-indexed array (array part) — ipairs() / numeric for uses raw slot access\nlocal arr = { 1, 2, 3 }\nfor i = 1, #arr do\n    _ = arr[i]\nend\n```\n\nReason: Lua tables are split internally into an **array part** (contiguous integer keys starting at 1) and a **hash part** (everything else, including string keys). Iterating the array part with a numeric `for` loop accesses values via direct slot indexing with no hashing, no key comparison, and no iterator closure overhead, making it significantly faster than `pairs()` over a string-keyed map, which must traverse the hash part's buckets and call the `next` metamethod on each step."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6904,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor( 255, 128, 0, 255 )\n```\n\nReason: Passing separate `r, g, b, a` integers avoids constructing (or unpacking) a `Color` table object each frame, eliminating the per-call heap allocation and the metatable lookup overhead that the Color-object overload incurs internally.","model_patch":"```lua\nsurface.SetDrawColor( 255, 128, 0, 255 )\n```\n\nReason: Passing separate `r, g, b, a` integers avoids constructing (or unpacking) a `Color` table object each frame, eliminating the per-call heap allocation and the metatable lookup overhead that the Color-object overload incurs internally."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10073,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- SQLite query using GMod's sql library (runs in-process, no network overhead)\nlocal result = sql.Query(\"SELECT data FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid))\nif result then\n    print(result[1].data)\nend\n```\n\nReason: Local SQLite via the `sql` library is lower latency because queries execute in-process against a local file with no network round-trip, whereas remote MySQL incurs TCP connection overhead, network latency, and authentication handshakes on every query — making SQLite the clear winner for a single-server setup with no sync requirement.","model_patch":"```lua\n-- SQLite query using GMod's sql library (runs in-process, no network overhead)\nlocal result = sql.Query(\"SELECT data FROM player_data WHERE steamid = \" .. sql.SQLStr(steamid))\nif result then\n    print(result[1].data)\nend\n```\n\nReason: Local SQLite via the `sql` library is lower latency because queries execute in-process against a local file with no network round-trip, whereas remote MySQL incurs TCP connection overhead, network latency, and authentication handshakes on every query — making SQLite the clear winner for a single-server setup with no sync requirement."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":13109,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Cache table: keyed by player entity index, cleared on disconnect\nlocal steamIDCache = {}\n\nhook.Add(\"PlayerDisconnected\", \"SteamIDCache_Cleanup\", function(ply)\n    steamIDCache[ply:EntIndex()] = nil\nend)\n\nlocal function GetCachedSteamID(ply)\n    local idx = ply:EntIndex()\n    local cached = steamIDCache[idx]\n    if cached then\n        return cached\n    end\n    local sid = ply:SteamID()\n    steamIDCache[idx] = sid\n    return sid\nend\n\n-- Usage in your hot path:\nhook.Add(\"Tick\", \"HotPathExample\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local sid = GetCachedSteamID(ply)\n        -- ... use sid freely without re-calling ply:SteamID()\n    end\nend)\n```\n\nReason: `ply:SteamID()` crosses the Lua/C++ boundary on every call; caching the string result in a Lua table keyed by the stable entity index means subsequent lookups are pure Lua table reads (O(1), no C call overhead), and the `PlayerDisconnected` hook ensures stale entries are evicted so a recycled entity index can't return a wrong SteamID.","model_patch":"```lua\n-- Cache table: keyed by player entity index, cleared on disconnect\nlocal steamIDCache = {}\n\nhook.Add(\"PlayerDisconnected\", \"SteamIDCache_Cleanup\", function(ply)\n    steamIDCache[ply:EntIndex()] = nil\nend)\n\nlocal function GetCachedSteamID(ply)\n    local idx = ply:EntIndex()\n    local cached = steamIDCache[idx]\n    if cached then\n        return cached\n    end\n    local sid = ply:SteamID()\n    steamIDCache[idx] = sid\n    return sid\nend\n\n-- Usage in your hot path:\nhook.Add(\"Tick\", \"HotPathExample\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        local sid = GetCachedSteamID(ply)\n        -- ... use sid freely without re-calling ply:SteamID()\n    end\nend)\n```\n\nReason: `ply:SteamID()` crosses the Lua/C++ boundary on every call; caching the string result in a Lua table keyed by the stable entity index means subsequent lookups are pure Lua table reads (O(1), no C call overhead), and the `PlayerDisconnected` hook ensures stale entries are evicted so a recycled entity index can't return a wrong SteamID."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":9054,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Slow: repeated .. creates a new string object on every iteration\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. \"piece\" .. i  -- O(n²) total allocations\nend\n\n-- Fast: collect into a table, then join once at the end\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\" .. i  -- only one allocation per piece\nend\nlocal result = table.concat(parts, \"\")  -- single final join\n```\n\nReason: Each `..` on a growing string copies the entire accumulated string into a new allocation, making repeated concatenation O(n²) in time and memory; `table.concat` defers the join to one pass, making it O(n).","model_patch":"```lua\n-- Slow: repeated .. creates a new string object on every iteration\nlocal result = \"\"\nfor i = 1, 10000 do\n    result = result .. \"piece\" .. i  -- O(n²) total allocations\nend\n\n-- Fast: collect into a table, then join once at the end\nlocal parts = {}\nfor i = 1, 10000 do\n    parts[#parts + 1] = \"piece\" .. i  -- only one allocation per piece\nend\nlocal result = table.concat(parts, \"\")  -- single final join\n```\n\nReason: Each `..` on a growing string copies the entire accumulated string into a new allocation, making repeated concatenation O(n²) in time and memory; `table.concat` defers the join to one pass, making it O(n)."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9127,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nsurface.SetDrawColor( 255, 255, 255, 255 )\nsurface.DrawRect( x, y, w, h )\n```\n\nReason: `draw.RoundedBox` is a Lua wrapper that validates arguments, sets the draw color via `surface.SetDrawColor`, and then calls `surface.DrawRect` internally — calling `surface.DrawRect` directly skips that wrapper overhead entirely, which compounds noticeably when issuing hundreds of draw calls per frame.","model_patch":"```lua\nsurface.SetDrawColor( 255, 255, 255, 255 )\nsurface.DrawRect( x, y, w, h )\n```\n\nReason: `draw.RoundedBox` is a Lua wrapper that validates arguments, sets the draw color via `surface.SetDrawColor`, and then calls `surface.DrawRect` internally — calling `surface.DrawRect` directly skips that wrapper overhead entirely, which compounds noticeably when issuing hundreds of draw calls per frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":18925,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Cache everything that does not change per-frame.\nlocal font = \"DermaDefault\"\nlocal text = \"Hello, world!\"\nlocal color = Color(255, 255, 255, 255)\n\n-- Fastest: bare surface.* calls.\n-- surface.SetFont / surface.SetTextColor / surface.SetTextPos are thin\n-- engine calls; surface.DrawText pushes the string to the renderer directly.\nhook.Add(\"HUDPaint\", \"FastText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(text)\nend)\n\n-- Slower alternatives shown for contrast:\n-- draw.SimpleText(text, font, 100, 100, color)\n-- draw.SimpleTextOutlined(text, font, 100, 100, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black)\n-- draw.DrawText(text, font, 100, 100, color)\n```\n\nReason: `draw.SimpleText`, `draw.DrawText`, and especially `draw.SimpleTextOutlined` are pure-Lua wrappers that perform extra per-call work — alignment branching, outline multi-pass loops, and redundant `surface.Set*` calls even when nothing changed — whereas the raw `surface.SetFont / SetTextColor / SetTextPos / DrawText` sequence is the minimal straight-line path to the engine with no branching or extra state writes.","model_patch":"```lua\n-- Cache everything that does not change per-frame.\nlocal font = \"DermaDefault\"\nlocal text = \"Hello, world!\"\nlocal color = Color(255, 255, 255, 255)\n\n-- Fastest: bare surface.* calls.\n-- surface.SetFont / surface.SetTextColor / surface.SetTextPos are thin\n-- engine calls; surface.DrawText pushes the string to the renderer directly.\nhook.Add(\"HUDPaint\", \"FastText\", function()\n    surface.SetFont(font)\n    surface.SetTextColor(color)\n    surface.SetTextPos(100, 100)\n    surface.DrawText(text)\nend)\n\n-- Slower alternatives shown for contrast:\n-- draw.SimpleText(text, font, 100, 100, color)\n-- draw.SimpleTextOutlined(text, font, 100, 100, color, TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, color_black)\n-- draw.DrawText(text, font, 100, 100, color)\n```\n\nReason: `draw.SimpleText`, `draw.DrawText`, and especially `draw.SimpleTextOutlined` are pure-Lua wrappers that perform extra per-call work — alignment branching, outline multi-pass loops, and redundant `surface.Set*` calls even when nothing changed — whereas the raw `surface.SetFont / SetTextColor / SetTextPos / DrawText` sequence is the minimal straight-line path to the engine with no branching or extra state writes."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7387,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal myTable = {\"a\", \"b\", \"c\"}\nlocal len = #myTable\n```\n\nReason: The `#` length operator is the idiomatic and preferred way to get the length of a sequential (integer-keyed) table in Lua and Garry's Mod Lua; `table.Count` exists in GMod but iterates all keys and is intended for non-sequential/mixed tables, making `#` both faster and more appropriate for arrays.","model_patch":"```lua\nlocal myTable = {\"a\", \"b\", \"c\"}\nlocal len = #myTable\n```\n\nReason: The `#` length operator is the idiomatic and preferred way to get the length of a sequential (integer-keyed) table in Lua and Garry's Mod Lua; `table.Count` exists in GMod but iterates all keys and is intended for non-sequential/mixed tables, making `#` both faster and more appropriate for arrays."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":12948,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Faster: reassign to a new table (O(1))\nt = {}\n\n-- Slower: table.Empty iterates every key and sets it to nil (O(n))\n-- table.Empty(t)\n```\n\nReason: `t = {}` is O(1) — it merely points the local reference at a fresh table and lets the GC collect the old one — whereas `table.Empty(t)` loops over every element setting each to `nil`, making it O(n) and proportionally slower as the table grows.","model_patch":"```lua\n-- Faster: reassign to a new table (O(1))\nt = {}\n\n-- Slower: table.Empty iterates every key and sets it to nil (O(n))\n-- table.Empty(t)\n```\n\nReason: `t = {}` is O(1) — it merely points the local reference at a fresh table and lets the GC collect the old one — whereas `table.Empty(t)` loops over every element setting each to `nil`, making it O(n) and proportionally slower as the table grows."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":9963,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Slow: table.HasValue iterates the list linearly O(n)\nlocal list = { \"combine\", \"zombie\", \"headcrab\" }\nif table.HasValue(list, \"zombie\") then\n    print(\"found\")\nend\n\n-- Fast: use a hash-set (value as key) for O(1) lookup\nlocal set = { combine = true, zombie = true, headcrab = true }\nif set[\"zombie\"] then\n    print(\"found\")\nend\n```\n\nReason: Lua tables are hash maps, so keyed lookups (`set[value]`) resolve in O(1) constant time, whereas `table.HasValue` iterates the entire sequential list until it finds a match, making it O(n) — noticeably slower as the list grows.","model_patch":"```lua\n-- Slow: table.HasValue iterates the list linearly O(n)\nlocal list = { \"combine\", \"zombie\", \"headcrab\" }\nif table.HasValue(list, \"zombie\") then\n    print(\"found\")\nend\n\n-- Fast: use a hash-set (value as key) for O(1) lookup\nlocal set = { combine = true, zombie = true, headcrab = true }\nif set[\"zombie\"] then\n    print(\"found\")\nend\n```\n\nReason: Lua tables are hash maps, so keyed lookups (`set[value]`) resolve in O(1) constant time, whereas `table.HasValue` iterates the entire sequential list until it finds a match, making it O(n) — noticeably slower as the list grows."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10226,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Faster: fields in the constructor\nlocal t = { x = 1, y = 2, z = 3 }\n\n-- Slower: assign fields after {}\nlocal t = {}\nt.x = 1\nt.y = 2\nt.z = 3\n```\n\nReason: The constructor form is faster because Lua (and LuaJIT used by GMod) pre-allocates the hash part of the table in a single pass when it can see the fields up front, whereas the post-assignment form triggers separate `SETTABLE`/`NEWINDEX` operations and may cause one or more internal rehashes as the table grows.","model_patch":"```lua\n-- Faster: fields in the constructor\nlocal t = { x = 1, y = 2, z = 3 }\n\n-- Slower: assign fields after {}\nlocal t = {}\nt.x = 1\nt.y = 2\nt.z = 3\n```\n\nReason: The constructor form is faster because Lua (and LuaJIT used by GMod) pre-allocates the hash part of the table in a single pass when it can see the fields up front, whereas the post-assignment form triggers separate `SETTABLE`/`NEWINDEX` operations and may cause one or more internal rehashes as the table grows."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7698,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal element = t[math.random(#t)]\n```\n\nReason: For sequential tables `#t` is O(1), so a direct index with `math.random` avoids the O(n) iteration that `table.Random` performs internally to handle arbitrary (non-sequential) keys.","model_patch":"```lua\nlocal element = t[math.random(#t)]\n```\n\nReason: For sequential tables `#t` is O(1), so a direct index with `math.random` avoids the O(n) iteration that `table.Random` performs internally to handle arbitrary (non-sequential) keys."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":6979,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal result = x * x\n```\n\nReason: Multiplication (`x * x`) is faster than `math.pow(x, 2)` or `x^2` in Lua because `^` calls the C `pow()` function (which handles fractional exponents and is thus slower), while `*` is a single native multiply instruction; in a tight loop this difference compounds noticeably.","model_patch":"```lua\nlocal result = x * x\n```\n\nReason: Multiplication (`x * x`) is faster than `math.pow(x, 2)` or `x^2` in Lua because `^` calls the C `pow()` function (which handles fractional exponents and is thus slower), while `*` is a single native multiply instruction; in a tight loop this difference compounds noticeably."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Sonnet 4.6 (Thinking)","model_name_or_path":"Claude Sonnet 4.6 (Thinking)","attemptIndex":1,"status":"partial","detail":"Uses ipairs but still allocates via player.GetAll() each time.","durationMs":8770,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- do something with ply\nend\n```\n\nReason: `ipairs` is preferred over `pairs` for array-like tables (sequential integer keys) because it iterates in order and stops at the first nil, making it both cleaner and marginally faster for the list returned by `player.GetAll()`.","model_patch":"```lua\nfor _, ply in ipairs(player.GetAll()) do\n    -- do something with ply\nend\n```\n\nReason: `ipairs` is preferred over `pairs` for array-like tables (sequential integer keys) because it iterates in order and stops at the first nil, making it both cleaner and marginally faster for the list returned by `player.GetAll()`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7909,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- do something with ent\nend\n```\n\nReason: `ents.FindByClass` queries the engine directly for entities matching the given class, so it never constructs a table of every entity in the map—unlike `ents.GetAll()` followed by a class filter.","model_patch":"```lua\nfor _, ent in ipairs(ents.FindByClass(\"prop_physics\")) do\n    -- do something with ent\nend\n```\n\nReason: `ents.FindByClass` queries the engine directly for entities matching the given class, so it never constructs a table of every entity in the map—unlike `ents.GetAll()` followed by a class filter."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Registers a named hook with hook.Add.","durationMs":7504,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\n\nReason: `hook.Add` registers a callback for a given game event; the first argument is the hook name (`\"Think\"`), the second is the unique identifier (`\"MyAddon.Think\"`), and the third is the function to call each frame.","model_patch":"```lua\nhook.Add(\"Think\", \"MyAddon.Think\", function()\nend)\n```\n\nReason: `hook.Add` registers a callback for a given game event; the first argument is the hook name (`\"Think\"`), the second is the unique identifier (`\"MyAddon.Think\"`), and the third is the function to call each frame."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Uses IsValid for entity/object validity.","durationMs":7498,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif IsValid(ent) then\n    ent:Remove() -- or any other method\nend\n```\n\nReason: `IsValid(ent)` returns `true` only when `ent` is non-nil, is an entity (or player/NPC), and has not been removed from the game world, making it the standard guard against using a stale or NULL entity reference.","model_patch":"```lua\nif IsValid(ent) then\n    ent:Remove() -- or any other method\nend\n```\n\nReason: `IsValid(ent)` returns `true` only when `ent` is non-nil, is an entity (or player/NPC), and has not been removed from the game world, making it the standard guard against using a stale or NULL entity reference."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9261,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message\nend)\n```\n\nReason: `net.Receive` registers a callback that fires whenever a net message with the given name arrives, providing the message length in bits and the sending player (server-side) or `nil` (client-side).","model_patch":"```lua\nnet.Receive(\"MyAddon.Sync\", function(len, ply)\n    -- handle the incoming message\nend)\n```\n\nReason: `net.Receive` registers a callback that fires whenever a net message with the given name arrives, providing the message length in bits and the sending player (server-side) or `nil` (client-side)."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":9292,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal ang_zero = Angle(0, 0, 0)          -- allocate once at load time\n\n-- Hot path: reuse the cached angle instead of Angle(0,0,0) each call\nlocal function GetSomeAngle()\n    return ang_zero                       -- no allocation, no GC pressure\nend\n```\n\nReason: `Angle()` allocates a new userdata + metatable every call; upvaluing a single pre-built zero angle eliminates per-frame allocation and reduces garbage-collector pressure in hot paths.","model_patch":"```lua\nlocal ang_zero = Angle(0, 0, 0)          -- allocate once at load time\n\n-- Hot path: reuse the cached angle instead of Angle(0,0,0) each call\nlocal function GetSomeAngle()\n    return ang_zero                       -- no allocation, no GC pressure\nend\n```\n\nReason: `Angle()` allocates a new userdata + metatable every call; upvaluing a single pre-built zero angle eliminates per-frame allocation and reduces garbage-collector pressure in hot paths."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"incorrect","detail":"Matched an incorrect-answer pattern.","durationMs":10101,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal cfg_color = myaddon.config.color   -- cache the nested lookup once\n\nlocal r = cfg_color.r                    -- read from the local\n```\n\nReason: In GLua (LuaJIT), a local variable is a register access (one op), while each `.` in a nested table is a hash lookup; caching the deepest-used table into a local eliminates repeated lookups and is measurably faster on hot paths.","model_patch":"```lua\nlocal cfg_color = myaddon.config.color   -- cache the nested lookup once\n\nlocal r = cfg_color.r                    -- read from the local\n```\n\nReason: In GLua (LuaJIT), a local variable is a register access (one op), while each `.` in a nested table is a hash lookup; caching the deepest-used table into a local eliminates repeated lookups and is measurably faster on hot paths."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9371,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\n\nReason: `getDarkRPVar(\"job\")` is DarkRP's own networked-variable accessor, which stays in sync with the DarkRP job system and is the officially supported method, whereas `GetNWString(\"job\")` bypasses DarkRP's abstraction and may break if the internal networking changes.","model_patch":"```lua\nlocal jobName = ply:getDarkRPVar(\"job\")\n```\n\nReason: `getDarkRPVar(\"job\")` is DarkRP's own networked-variable accessor, which stays in sync with the DarkRP job system and is the officially supported method, whereas `GetNWString(\"job\")` bypasses DarkRP's abstraction and may break if the internal networking changes."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7546,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nif a:DistToSqr(b) < threshold * threshold then\n    -- within range\nend\n```\n\nReason: `DistToSqr` skips the expensive square-root that `Distance` performs, and squaring the threshold is trivial, making it the preferred method for simple range/threshold checks.","model_patch":"```lua\nif a:DistToSqr(b) < threshold * threshold then\n    -- within range\nend\n```\n\nReason: `DistToSqr` skips the expensive square-root that `Distance` performs, and squaring the threshold is trivial, making it the preferred method for simple range/threshold checks."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8686,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor _, ent in ents.Iterator() do\n    -- operate on ent\nend\n```\n\nReason: `ents.Iterator()` is the Garry's Mod wiki-recommended iterator for looping over all entities; it avoids the overhead of `ents.GetAll()`, which allocates a new table on every call.","model_patch":"```lua\nfor _, ent in ents.Iterator() do\n    -- operate on ent\nend\n```\n\nReason: `ents.Iterator()` is the Garry's Mod wiki-recommended iterator for looping over all entities; it avoids the overhead of `ents.GetAll()`, which allocates a new table on every call."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"Answer must contain 0 through 0 candidate loops.","durationMs":8492,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 512)\nfor _, ent in ipairs(nearby) do\n    if IsValid(ent) and ent ~= ply then\n        -- work with ent\n    end\nend\n```\n\nReason: `ents.FindInSphere` is implemented engine-side in C++ and consistently benchmarks as one of the fastest `FindIn*` calls for proximity queries, outperforming Lua-side distance loops and avoiding the view-dependency quirks of `FindInPVS`.","model_patch":"```lua\nlocal nearby = ents.FindInSphere(ply:GetPos(), 512)\nfor _, ent in ipairs(nearby) do\n    if IsValid(ent) and ent ~= ply then\n        -- work with ent\n    end\nend\n```\n\nReason: `ents.FindInSphere` is implemented engine-side in C++ and consistently benchmarks as one of the fastest `FindIn*` calls for proximity queries, outperforming Lua-side distance loops and avoiding the view-dependency quirks of `FindInPVS`."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":10682,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local found = {}\n    local r2 = radius * radius          -- compare squared distances\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= r2 then\n            found[#found + 1] = ply\n        end\n    end\n    return found\nend\n```\n\nReason: `player.GetAll()` iterates only over connected players (typically tens) instead of every entity on the map (often thousands), and `DistToSqr` avoids a per-player square-root, making this O(players) with cheaper math versus O(all entities) + filtering.","model_patch":"```lua\nlocal function PlayersInRadius(pos, radius)\n    local found = {}\n    local r2 = radius * radius          -- compare squared distances\n    for _, ply in ipairs(player.GetAll()) do\n        if ply:GetPos():DistToSqr(pos) <= r2 then\n            found[#found + 1] = ply\n        end\n    end\n    return found\nend\n```\n\nReason: `player.GetAll()` iterates only over connected players (typically tens) instead of every entity on the map (often thousands), and `DistToSqr` avoids a per-player square-root, making this O(players) with cheaper math versus O(all entities) + filtering."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9613,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nfor i = 1, n do\nend\n```\n\nReason: In GLua (LuaJIT), a numeric `for` loop is faster because the counter, limit, and step live in dedicated VM registers and the increment + boundary check compiles to a single `FORL` bytecode instruction, whereas a `while` loop requires separate variable loads, an explicit increment, and a conditional jump each iteration.","model_patch":"```lua\nfor i = 1, n do\nend\n```\n\nReason: In GLua (LuaJIT), a numeric `for` loop is faster because the counter, limit, and step live in dedicated VM registers and the increment + boundary check compiles to a single `FORL` bytecode instruction, whereas a `while` loop requires separate variable loads, an explicit increment, and a conditional jump each iteration."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":11627,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n-- Pattern A: one hook.Run per tick, pass the full player table\nhook.Add(\"Tick\", \"BatchNotify\", function()\n    hook.Run(\"MyCustomLogic\", player.GetAll())\nend)\n\n-- Pattern B: loop players, one hook.Run per player per tick\nhook.Add(\"Tick\", \"PerPlayerNotify\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyCustomLogic\", ply)\n    end\nend)\n```\n\nReason: Pattern A is faster because `hook.Run` has fixed per-call overhead (table lookup of registered listeners, function dispatch, and argument packing); calling it once with the full player list pays that cost once per tick, while Pattern B pays it N times (once per player), making the overhead scale linearly with player count.","model_patch":"```lua\n-- Pattern A: one hook.Run per tick, pass the full player table\nhook.Add(\"Tick\", \"BatchNotify\", function()\n    hook.Run(\"MyCustomLogic\", player.GetAll())\nend)\n\n-- Pattern B: loop players, one hook.Run per player per tick\nhook.Add(\"Tick\", \"PerPlayerNotify\", function()\n    for _, ply in ipairs(player.GetAll()) do\n        hook.Run(\"MyCustomLogic\", ply)\n    end\nend)\n```\n\nReason: Pattern A is faster because `hook.Run` has fixed per-call overhead (table lookup of registered listeners, function dispatch, and argument packing); calling it once with the full player list pays that cost once per tick, while Pattern B pays it N times (once per player), making the overhead scale linearly with player count."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9705,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local hp = LocalPlayer():Health()\n\n    draw.SimpleText(\"HP: \" .. hp, \"DermaLarge\", 50, 50, color_white)\n    draw.RoundedBox(0, 50, 80, hp * 2, 20, Color(255, 0, 0))\n    draw.SimpleText(hp .. \"%\", \"DermaDefault\", 50 + hp, 85, color_white)\nend)\n```\n\nReason: Caching `LocalPlayer():Health()` in a local avoids two redundant method calls per frame, since local variable access is faster than repeated table lookups and function calls in Lua.","model_patch":"```lua\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    local hp = LocalPlayer():Health()\n\n    draw.SimpleText(\"HP: \" .. hp, \"DermaLarge\", 50, 50, color_white)\n    draw.RoundedBox(0, 50, 80, hp * 2, 20, Color(255, 0, 0))\n    draw.SimpleText(hp .. \"%\", \"DermaDefault\", 50 + hp, 85, color_white)\nend)\n```\n\nReason: Caching `LocalPlayer():Health()` in a local avoids two redundant method calls per frame, since local variable access is faster than repeated table lookups and function calls in Lua."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":8878,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    -- use the pre-allocated 'white' instead of Color(255,255,255) each frame\n    draw.SimpleText(\"Hello\", \"DermaDefault\", 50, 50, white)\nend)\n```\n\nReason: `Color()` allocates a new table every call; hoisting it outside the paint hook creates the table once and reuses it each frame, eliminating per-frame garbage.","model_patch":"```lua\nlocal white = Color(255, 255, 255)\n\nhook.Add(\"HUDPaint\", \"MyHUD\", function()\n    -- use the pre-allocated 'white' instead of Color(255,255,255) each frame\n    draw.SimpleText(\"Hello\", \"DermaDefault\", 50, 50, white)\nend)\n```\n\nReason: `Color()` allocates a new table every call; hoisting it outside the paint hook creates the table once and reuses it each frame, eliminating per-frame garbage."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":7651,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local val = sin(i * 0.01)\nend\n```\n\nReason: Caching `math.sin` in a local variable avoids repeated global (`math`) and field (`sin`) table lookups on every iteration, since local access in Lua uses faster register-based indexing.","model_patch":"```lua\nlocal sin = math.sin\n\nfor i = 1, 100000 do\n    local val = sin(i * 0.01)\nend\n```\n\nReason: Caching `math.sin` in a local variable avoids repeated global (`math`) and field (`sin`) table lookups on every iteration, since local access in Lua uses faster register-based indexing."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"pass","detail":"Matched a pass pattern.","durationMs":9413,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"MyThink\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply freely; the global lookup of LocalPlayer is already cached\n    local hp = ply:Health()\n    local pos = ply:GetPos()\nend)\n```\n\nReason: Lua resolves globals by walking up environment tables each call; `local LocalPlayer = LocalPlayer` at the top of the file snapshots the function reference into a local slot, which the VM accesses by fixed register index instead of a hash lookup, making every subsequent `LocalPlayer()` call faster.","model_patch":"```lua\nlocal LocalPlayer = LocalPlayer\n\nhook.Add(\"Think\", \"MyThink\", function()\n    local ply = LocalPlayer()\n    if not IsValid(ply) then return end\n\n    -- use ply freely; the global lookup of LocalPlayer is already cached\n    local hp = ply:Health()\n    local pos = ply:GetPos()\nend)\n```\n\nReason: Lua resolves globals by walking up environment tables each call; `local LocalPlayer = LocalPlayer` at the top of the file snapshots the function reference into a local slot, which the VM accesses by fixed register index instead of a hash lookup, making every subsequent `LocalPlayer()` call faster."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"partial","detail":"Matched a partial-answer pattern.","durationMs":15371,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":"```lua\n--- Returns true when both players are roughly facing each other.\n-- Uses dot products only – no trig calls.\n-- @param threshold number  Dot-product cutoff (default -0.5 ≈ within ~120° cone).\nfunction ArePlayersFacing(ply1, ply2, threshold)\n    threshold = threshold or -0.5\n\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n\n    -- Each aim must point *toward* the other player.\n    -- The direction from ply1→ply2 is compared against aim1, and vice-versa.\n    local delta = ply2:GetShootPos() - ply1:GetShootPos()\n    delta:Normalize()\n\n    -- aim1 should align with delta   (dot > 0 means ply1 looks toward ply2)\n    -- aim2 should align with -delta  (dot > 0 means ply2 looks toward ply1)\n    -- Equivalently: aim1·delta > 0  AND  aim2·delta < 0\n\n    -- For a tighter \"staring each other down\" test we also check that the\n    -- two aim vectors themselves oppose each other (dot < threshold).\n    return aim1:Dot(delta)  > -threshold   -- ply1 faces ply2\n       and aim2:Dot(delta)  <  threshold   -- ply2 faces ply1\n       and aim1:Dot(aim2)   <  threshold   -- aims oppose each other\nend\n```\n\nReason: `Vector:Dot` is a single multiply-add (no square roots, no `math.acos`), so three dot products plus a normalize is far cheaper than computing angles, and the threshold is trivially tunable without touching trig.","model_patch":"```lua\n--- Returns true when both players are roughly facing each other.\n-- Uses dot products only – no trig calls.\n-- @param threshold number  Dot-product cutoff (default -0.5 ≈ within ~120° cone).\nfunction ArePlayersFacing(ply1, ply2, threshold)\n    threshold = threshold or -0.5\n\n    local aim1 = ply1:GetAimVector()\n    local aim2 = ply2:GetAimVector()\n\n    -- Each aim must point *toward* the other player.\n    -- The direction from ply1→ply2 is compared against aim1, and vice-versa.\n    local delta = ply2:GetShootPos() - ply1:GetShootPos()\n    delta:Normalize()\n\n    -- aim1 should align with delta   (dot > 0 means ply1 looks toward ply2)\n    -- aim2 should align with -delta  (dot > 0 means ply2 looks toward ply1)\n    -- Equivalently: aim1·delta > 0  AND  aim2·delta < 0\n\n    -- For a tighter \"staring each other down\" test we also check that the\n    -- two aim vectors themselves oppose each other (dot < threshold).\n    return aim1:Dot(delta)  > -threshold   -- ply1 faces ply2\n       and aim2:Dot(delta)  <  threshold   -- ply2 faces ply1\n       and aim1:Dot(aim2)   <  threshold   -- aims oppose each other\nend\n```\n\nReason: `Vector:Dot` is a single multiply-add (no square roots, no `math.acos`), so three dot products plus a normalize is far cheaper than computing angles, and the threshold is trivially tunable without touching trig."}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6670,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5922,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6118,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5890,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5949,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5744,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5878,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7216,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6524,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6431,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6939,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5868,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6180,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5907,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5968,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6132,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5864,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7010,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6755,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"Claude Opus 4.6 (Thinking)","model_name_or_path":"Claude Opus 4.6 (Thinking)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6720,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.ents-iterator.v1","fixtureId":"gmod.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6911,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.hook-add.v1","fixtureId":"gmod.hook-add.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6036,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.isvalid.v1","fixtureId":"gmod.isvalid.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7188,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.net-receivers.v1","fixtureId":"gmod.net-receivers.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6732,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.angle-zero.v1","fixtureId":"gmod.perf.angle-zero.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6927,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.config-var.v1","fixtureId":"gmod.perf.config-var.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7070,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.darkrpvar.v1","fixtureId":"gmod.perf.darkrpvar.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6074,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.disttosqr.v1","fixtureId":"gmod.perf.disttosqr.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7833,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ents-iterator.v1","fixtureId":"gmod.perf.ents-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6197,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-ents-near.v1","fixtureId":"gmod.perf.find-ents-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6315,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.find-players-near.v1","fixtureId":"gmod.perf.find-players-near.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7150,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.for-vs-while.v1","fixtureId":"gmod.perf.for-vs-while.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7159,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hook-once.v1","fixtureId":"gmod.perf.hook-once.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6682,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.hudpaint-cache.v1","fixtureId":"gmod.perf.hudpaint-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6098,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-color.v1","fixtureId":"gmod.perf.local-color.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6993,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.local-vs-global.v1","fixtureId":"gmod.perf.local-vs-global.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":7029,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.localplayer-cache.v1","fixtureId":"gmod.perf.localplayer-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5852,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.looking-at.v1","fixtureId":"gmod.perf.looking-at.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6900,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.meta-vs-arg.v1","fixtureId":"gmod.perf.meta-vs-arg.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6538,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.msg-vs-print.v1","fixtureId":"gmod.perf.msg-vs-print.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6619,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.pairs-ipairs-for.v1","fixtureId":"gmod.perf.pairs-ipairs-for.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6419,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.plain-lua-vs-fn.v1","fixtureId":"gmod.perf.plain-lua-vs-fn.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6927,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.player-cache-hooks.v1","fixtureId":"gmod.perf.player-cache-hooks.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5880,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.ply-table-index.v1","fixtureId":"gmod.perf.ply-table-index.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6638,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.seq-tables.v1","fixtureId":"gmod.perf.seq-tables.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5882,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.setdrawcolor-split.v1","fixtureId":"gmod.perf.setdrawcolor-split.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6744,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.sqlite-vs-mysql.v1","fixtureId":"gmod.perf.sqlite-vs-mysql.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6812,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.steamid-cache.v1","fixtureId":"gmod.perf.steamid-cache.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6079,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.string-table-concat.v1","fixtureId":"gmod.perf.string-table-concat.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6089,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-drawrect.v1","fixtureId":"gmod.perf.surface-drawrect.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6274,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.surface-text.v1","fixtureId":"gmod.perf.surface-text.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6063,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-count-hash.v1","fixtureId":"gmod.perf.table-count-hash.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6872,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-empty.v1","fixtureId":"gmod.perf.table-empty.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6116,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-hasvalue.v1","fixtureId":"gmod.perf.table-hasvalue.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6891,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-literal.v1","fixtureId":"gmod.perf.table-literal.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6253,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.table-random.v1","fixtureId":"gmod.perf.table-random.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6934,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.perf.x-times-x.v1","fixtureId":"gmod.perf.x-times-x.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":6712,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
{"runId":"4524afb8-11f9-4d79-b50f-a599f7b0109c","instance_id":"gmod.player-iterator.v1","fixtureId":"gmod.player-iterator.v1","fixtureVersion":null,"rubricVersion":null,"promptHash":null,"adapterId":"agy","model":"GPT-OSS 120B (Medium)","model_name_or_path":"GPT-OSS 120B (Medium)","attemptIndex":1,"status":"protocol_error","detail":"CLI exited without a valid strict response.","durationMs":5935,"startedAt":null,"completedAt":null,"answerBytes":null,"answerChars":null,"httpStatus":null,"httpAttempts":null,"exitCode":null,"usage":null,"finalResponse":null,"model_patch":null}
