marqdo

Mid stdlib — stats and log fieldsok

features/17-stats-log.mq.md

文档

stats:lib/stats.mq.mdlog:lib/log.mq.md

Closing Mid2 sugar

说明

Light statistics and optional fields= on log lines — no remote sinks, no dataframes.

main

说明
xs =
10
20
30
m = > stats.mean list=`xs`
> print text=m
fld =
stepstatus
doneok
> log.info text="mid2-m10" fields=fld
Functions
Variables
  • description text
    Thin mean/median/stdev + structured log fields (Mid2 M10)
  • fld map · 2
    stepdone
    statusok
  • m num
    20
  • markup text
    occlusion
  • title text
    Mid stdlib — stats and log fields
  • xs list · 3
    #value
    110
    220
    330
可执行知识(辅助)

运行与结果

20 INFO mid2-m10 step=done status=ok
完整源码
---
markup: occlusion
title: Mid stdlib — stats and log fields
description: Thin mean/median/stdev + structured log fields (Mid2 M10)
import:
  stats: lib/stats.mq.md
  log: lib/log.mq.md
---

# Closing Mid2 sugar

Light statistics and optional `fields=` on log lines — no remote sinks, no dataframes.

# main

`xs` =

| |
|---|
| 10 |
| 20 |
| 30 |

**m = > stats.mean list=`xs`**
> print text=`m`

`fld` =

| step | status |
|------|--------|
| done | ok |

> log.info text="mid2-m10" fields=`fld`

Variable