{"id":"compute.profiling--memorySample","name":"memorySample","owner":"yeho","package":"compute.profiling","kind":"thing","signature":"external thing memorySample","description":"A memory sample record carrying label, stage, device, bytesBefore, bytesAfter, and related state.","context":"Collect and describe compute timing, work, and profiling records.","parameters":[],"returns":"void","members":[{"name":"label","kind":"field","type":"text","description":"Stores label as text.","signature":"text label","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"stage","kind":"field","type":"text","description":"Stores stage as text.","signature":"text stage","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"device","kind":"field","type":"text","description":"Stores device as text.","signature":"text device","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"bytesBefore","kind":"field","type":"int","description":"Stores bytes before as int.","signature":"int bytesBefore","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"bytesAfter","kind":"field","type":"int","description":"Stores bytes after as int.","signature":"int bytesAfter","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"peakBytes","kind":"field","type":"int","description":"Stores peak bytes as int.","signature":"int peakBytes","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"reusedBytes","kind":"field","type":"int","description":"Stores reused bytes as int.","signature":"int reusedBytes","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"note","kind":"field","type":"text","description":"Stores note as text.","signature":"text note","tags":["thing","field","compute.profiling"],"updated":"2026-09-09"},{"name":"memorySample","kind":"constructor","parameters":[{"name":"label","type":"text","description":"Label."},{"name":"stage","type":"text","description":"Stage."},{"name":"device","type":"text","description":"Device."},{"name":"bytesBefore","type":"int","description":"Bytes before."},{"name":"bytesAfter","type":"int","description":"Bytes after."},{"name":"peakBytes","type":"int","description":"Peak bytes."},{"name":"reusedBytes","type":"int","description":"Reused bytes."},{"name":"note","type":"text","description":"Note."}],"returns":"void","signature":"memorySample(text label, text stage, text device, int bytesBefore, int bytesAfter, int peakBytes, int reusedBytes, text note)","description":"Memory sample.","tags":["thing","constructor","compute.profiling"],"updated":"2026-09-09"},{"name":"DeltaBytes","kind":"method","parameters":[],"returns":"int","signature":"DeltaBytes() returns int","description":"Delta bytes.","tags":["thing","method","compute.profiling"],"exampleId":"method-DeltaBytes-9","updated":"2026-09-09"},{"name":"HasReuse","kind":"method","parameters":[],"returns":"bool","signature":"HasReuse() returns bool","description":"Has reuse.","tags":["thing","method","compute.profiling"],"exampleId":"method-HasReuse-10","updated":"2026-09-09"},{"name":"Describe","kind":"method","parameters":[],"returns":"text","signature":"Describe() returns text","description":"Describe.","tags":["thing","method","compute.profiling"],"exampleId":"method-Describe-11","updated":"2026-09-09"}],"tags":["compute","compute.profiling","cpu","method","profiling","source-example","thing","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/compute/profiling/profiling.yh","line":448,"sha256":"067dd2a8894dc02cf9197cfff4d83258fae401d7f03ae44b9f38d3c68bed1e7b"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use memorySample","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using compute.profiling\n\n// Collect and describe compute timing, work, and profiling records.\nmemorySample sample = memorySample(\"Player health\", \"stage\", \"device\", 4, 4, 4, 4, \"note\")\nConsole.Log(Text.From(sample.label))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_profiling__memorysample\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.profiling\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/profiling\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"331ca0d613275f1323df3814ef12ff45c8b16dea728bc92eaeedfd8b2d0ed35d","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-DeltaBytes-9","title":"memorySample.DeltaBytes","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.profiling\n\n// Delta bytes.\nmemorySample instance = memorySample(\"Player health\", \"stage\", \"device\", 4, 4, 4, 4, \"note\")\nint result = instance.DeltaBytes()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_profiling__memorysample\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.profiling\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/profiling\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"44176309f9f3af9a0d108353a8b36ff0f7f1c1bf81f04e3696463e206937c802","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-HasReuse-10","title":"memorySample.HasReuse","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.profiling\n\n// Has reuse.\nmemorySample instance = memorySample(\"Player health\", \"stage\", \"device\", 4, 4, 4, 4, \"note\")\nbool result = instance.HasReuse()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_profiling__memorysample\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.profiling\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/profiling\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"18f24bbe40572e778d30dd397918367e0eebbb57f10aba7148b94c68a4227f62","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-11","title":"memorySample.Describe","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.profiling\n\n// Describe.\nmemorySample instance = memorySample(\"Player health\", \"stage\", \"device\", 4, 4, 4, 4, \"note\")\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_profiling__memorysample\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.profiling\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/profiling\"\n\n[[dependencies]]\npackage = \"compute.tensor\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/tensor\"\n\n[[dependencies]]\npackage = \"console\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/console\"\n\n[[dependencies]]\npackage = \"diagnostics\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/diagnostics\"\n","tags":["cpu","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"a4ea993521b3d0b0b82f340a0b46da9dc32c4db2ddbba6a158926fdeb0374adc","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["label","stage","device","bytesBefore","bytesAfter","peakBytes","reusedBytes","note","memorySample","DeltaBytes","HasReuse","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=compute.profiling--memorySample","json":"https://demonhunterlabs.com/reference/items/compute.profiling--memorySample.json","markdown":"https://demonhunterlabs.com/reference/text/compute.profiling--memorySample.md"}
