MCPcopy Create free account
hub / github.com/dataease/SQLBot / Cp

Function Cp

frontend/public/swagger-ui-bundle.js:43695–43892  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

43693 }),
43694 (C.displayTrace = () => w))
43695 },
43696 Cp = function fnstats() {
43697 const s = Pp
43698 let o, i, a
43699 const u = [],
43700 _ = [],
43701 w = []
43702 ;((this.init = (s, a) => {
43703 ;((o = s), (i = a), clear())
43704 }),
43705 (this.collect = (o, i) => {
43706 ;(incStat(a, i.state, i.phraseLength),
43707 incStat(u[o.type], i.state, i.phraseLength),
43708 o.type === s.RNM && incStat(_[o.index], i.state, i.phraseLength),
43709 o.type === s.UDT && incStat(w[o.index], i.state, i.phraseLength))
43710 }),
43711 (this.displayStats = () => {
43712 let o = ''
43713 const i = { match: 0, empty: 0, nomatch: 0, total: 0 },
43714 displayRow = (s, o, a, u, _) => {
43715 ;((i.match += o), (i.empty += a), (i.nomatch += u), (i.total += _))
43716 return `${s} | ${normalize(o)} | ${normalize(a)} | ${normalize(u)} | ${normalize(_)} |\n`
43717 }
43718 return (
43719 (o += ' OPERATOR STATS\n'),
43720 (o += ' | MATCH | EMPTY | NOMATCH | TOTAL |\n'),
43721 (o += displayRow(
43722 ' ALT',
43723 u[s.ALT].match,
43724 u[s.ALT].empty,
43725 u[s.ALT].nomatch,
43726 u[s.ALT].total
43727 )),
43728 (o += displayRow(
43729 ' CAT',
43730 u[s.CAT].match,
43731 u[s.CAT].empty,
43732 u[s.CAT].nomatch,
43733 u[s.CAT].total
43734 )),
43735 (o += displayRow(
43736 ' REP',
43737 u[s.REP].match,
43738 u[s.REP].empty,
43739 u[s.REP].nomatch,
43740 u[s.REP].total
43741 )),
43742 (o += displayRow(
43743 ' RNM',
43744 u[s.RNM].match,
43745 u[s.RNM].empty,
43746 u[s.RNM].nomatch,
43747 u[s.RNM].total
43748 )),
43749 (o += displayRow(
43750 ' TRG',
43751 u[s.TRG].match,
43752 u[s.TRG].empty,

Callers

nothing calls this directly

Calls 3

incStatFunction · 0.85
displayRowFunction · 0.85
clearFunction · 0.70

Tested by

no test coverage detected