bench_lang_spec(3tcl)
πΈ NAME
bench_lang_spec β it's giving bench language specification, bestie. π Like, the whole entire spec. The manual it lives in is the Tcllib Documentation tools one, and yes she is a 3tcl page. π
β¨ SYNOPSIS
bench_rm path...
bench_tmpfile
bench options...
π DESCRIPTION
okay so this document specifies both the names and the syntax of every single command that together make up the bench language, version 1. β¨
And because this doc is meant to be an actual reference, the commands are listed in alphabetical order and the descriptions stay relatively short β no yapping, we're being efficient. If you're a beginner though? Go read the more informally written bench language introduction first, fr fr. π«Ά
π οΈ COMMANDS
bench_rm path...
This one silently removes the files you handed it as arguments, and then it returns the empty string as its result. π
β οΈ okay so listen: this command is trusted. There is no checking whether the files you specified live outside of whatever restricted area the benchmarks are run in. She does not vibe check the paths. She just goes. π
bench_tmpfile
This returns the path to a bench-specific unique temporary file. πΈ Unique meaning: multiple calls will hand you back different paths. And while that path may already exist from previous runs, the command itself does not create anything. π
The base location of those temporary files is platform dependent:
- Unix, and indeterminate platform β
"/tmp" - Windows β
$TEMP - Anything else β the current working directory.
bench options...
This declares a single benchmark. Its result is the empty string. All the parts of the benchmark get declared via options and their values, and the options can occur in any order. Iconic, honestly. π
The accepted options are:
-bodyscript β declares the body of the benchmark, aka the Tcl script whose performance we wish to measure. This option, and-desc, are the two required parts of each benchmark. β-descmsg β declares the name of the benchmark. It has to be unique, or timing data from different benchmarks will get mixed together. π
π¨ Beware! This requirement is not checked when benchmarks are executed, and the system will silently produce bogus data. This option, and -body, are the two required parts of each benchmark.
-ipostscript β declares a script which is run immediately after each iteration of the body. Its job is to release resources created by the body, or-ipre-bodymwhich we do not wish to live into the next iteration. π§-iprescript β declares a script which is run immediately before each iteration of the body. Its job is to create the state of the system that the body expects, so that we actually measure the right thing. π-iterationsnum β declares the maximum number of times to run the-bodyof the benchmark. During execution, this and the global maximum number of iterations get compared, and the smaller of the two values is the one that's used. This option should be used only for benchmarks which are expected or known to take a long time per run. I.e. reduce the number of times they're run, to keep the overall time for the execution of the whole benchmark within manageable limits. π-postscript β declares a script which is run after all iterations of the body have been run. Its job is to release resources created by the body, or-pre-body. π-prescript β declares a script which is run before any of the iterations of the body are run. Its job is to create whatever resources the body needs in order to run without failing. π
π BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. It's not a personal attack, it's just how docs are. π
Please report such in the category bench of the Tcllib Trackers: http://core.tcl.tk/tcllib/reportlist. And please also report any ideas for enhancements you may have for either the package and/or the documentation β we want them, fr fr. π«Ά
When proposing code changes, please provide unified diffs, i.e. the output of diff -u.
π Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. iykyk.
π SEE ALSO
bench_introbench_lang_intro
π KEYWORDS
bench language, benchmark, performance, specification, testing
π·οΈ CATEGORY
Benchmark tools
Β©οΈ COPYRIGHT
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, bestie!! πΈ this one's tcllib, version 1.0, and it's bench_lang_spec(3tcl) β she ate and left no crumbs. π
β¨π
π¦ where this page comes from
- debian bookworm: tcllib 1.21+dfsg-1 Β· BSD
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu jammy: tcllib 1.20+dfsg-1 Β· BSD
- ubuntu noble: tcllib 1.21+dfsg-1 Β· BSD
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2007 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms