MaxReports
untyped bigintValue
(100 <untyped> bigint)
MaxNotes
untyped bigintValue
(50 <untyped> bigint)
Report
typeReport is one snapshot of the running totals, kept forever.
Value
v1.Report
Note
typeNote is a public remark by the owner, for example a change of plan that readers should know about. Notes are added, never edited or removed.
Value
v1.Note
Experiment
typeExperiment is one locked plan and everything recorded against it.
Value
v1.Experiment
experiments
*v0.Tree// key(id) -> \*Experiment
- OID
- 0bf4cb…8539:4
experiments details
lastID
uint64Value
2
Register
func(title string, hypothesis string, metric string, control string, variant string, direction string, target string, minSample int64) uint64Register locks a new plan and returns its id. The caller becomes the owner. direction is "increase" or "decrease". target is the smallest relative change that counts as a win, as a percentage such as "15" or "12.5". minSample is the number of exposures each arm must reach before the result can count.
- OID
- 0bf4cb…8539:7
Register details
AddReport
func(id uint64, controlExposures int64, controlConversions int64, variantExposures int64, variantConversions int64, source string)AddReport records the running totals for both arms. Only the owner can report, only while the experiment is open, and no total may go down. source says where the numbers came from, for example a dashboard link.
- OID
- 0bf4cb…8539:9
AddReport details
AddCorrection
func(id uint64, controlExposures int64, controlConversions int64, variantExposures int64, variantConversions int64, reason string)AddCorrection replaces the running totals after a mistake, for example a mistyped count. Unlike AddReport it may lower a total, so it asks for a reason and is shown on the page as a correction. The mistaken report stays on the record: a correction is added after it, never written over it. Only the owner can correct, and only while the experiment is open.
- OID
- 0bf4cb…8539:10
AddCorrection details
AddNote
func(id uint64, text string)AddNote attaches a public remark to an experiment. Only the owner can add one, at any time, including after the experiment is closed.
- OID
- 0bf4cb…8539:11
AddNote details
Close
func(id uint64) stringClose ends an experiment and stores the verdict of its last report judged against the locked plan. Only the owner can close, once, and only after at least one report. It returns the outcome: "met", "missed" or "inconclusive".
- OID
- 0bf4cb…8539:12
Close details
Count
func() intCount returns how many experiments have been registered.
- OID
- 0bf4cb…8539:13
Count details
Status
func(id uint64) stringStatus returns "open" while an experiment is running, and afterwards its outcome: "met", "missed" or "inconclusive". Other realms can call it to act on a result, for example to release a reward only when a target was met.
- OID
- 0bf4cb…8539:14
Status details
OwnerOf
func(id uint64) .uverse.address- OID
- 0bf4cb…8539:15
OwnerOf details
DigestOf
func(id uint64) stringDigestOf returns the fingerprint of the locked plan.
- OID
- 0bf4cb…8539:16
DigestOf details
Matches
func(id uint64, title string, hypothesis string, metric string, control string, variant string, direction string, target string, minSample int64) boolMatches reports whether the given plan text is exactly what was locked under id. It recomputes the fingerprint from the arguments, so anyone can check a plan they were shown against the public record.
- OID
- 0bf4cb…8539:17
Matches details
LiftOf
func(id uint64) (liftBps int64, ok bool)LiftOf returns the lift of the latest report in basis points. ok is false when there is no report yet or the lift is undefined.
- OID
- 0bf4cb…8539:18
LiftOf details
mustGet
func(id uint64) *v1.ExperimentmustGet returns the experiment or stops the transaction.
- OID
- 0bf4cb…8539:19
mustGet details
assertOwner
func(caller .uverse.address, exp *v1.Experiment)assertOwner stops the transaction unless caller owns exp. Pass the direct caller of the crossing function: cur.Previous().Address().
- OID
- 0bf4cb…8539:20
assertOwner details
checkOptionalText
func(name string, s string)checkOptionalText allows an empty value, and otherwise a single line within the package text limit.
- OID
- 0bf4cb…8539:21
checkOptionalText details
key
func(id uint64) stringkey turns an id into a fixed-width string so the tree keeps numeric order.
- OID
- 0bf4cb…8539:22
key details
listLimit
untyped bigintValue
(30 <untyped> bigint)
webPath
untyped stringValue
"/r/g1v9mz7rtgkvwkw90ey6496h5fk6pj6cgyawkvft/dokimi/v1"
rulesPath
untyped stringValue
"gno.land/p/g1v9mz7rtgkvwkw90ey6496h5fk6pj6cgyawkvft/dokimi/v1"
Render
func(path string) stringRender draws the registry for gnoweb. "" the home page: the list and the form to lock a new plan "<id>" one experiment: its plan, reports, notes and verdict
- OID
- 0bf4cb…8539:23
Render details
renderHome
func() string- OID
- 0bf4cb…8539:25
renderHome details
renderExperiment
func(exp *v1.Experiment) string- OID
- 0bf4cb…8539:26
renderExperiment details
corrections
func(exp *v1.Experiment) intcorrections counts the reports that were added as corrections.
- OID
- 0bf4cb…8539:27
corrections details
statusLabel
func(exp *v1.Experiment) stringstatusLabel is the one-word state shown in lists and headers.
- OID
- 0bf4cb…8539:28
statusLabel details
outcomeLabel
func(o v1.Outcome) string- OID
- 0bf4cb…8539:29
outcomeLabel details
targetLabel
func(p v1.Plan) stringtargetLabel renders the target with the sign of the expected direction.
- OID
- 0bf4cb…8539:30
targetLabel details
tallyLabel
func(t v1.Tally) stringtallyLabel renders "268 of 1,530 (17.51%)".
- OID
- 0bf4cb…8539:31
tallyLabel details
span
func(d time.Duration) stringspan renders how long passed between two block times, in plain words.
- OID
- 0bf4cb…8539:32
span details
stamp
func(t time.Time) stringstamp renders a block time in UTC.
- OID
- 0bf4cb…8539:33