[ 
https://issues.apache.org/jira/browse/TS-3346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311451#comment-14311451
 ] 

Kit Chan commented on TS-3346:
------------------------------

yeah. for sure we can do something more elegant

ts.stat_create("name of metric", type, persistence, sync)
stat = ts.stat_find("name of metric")
stat:increment(incr)
stat:decrement(decr)
value = stat:get_value()
stat:set_value(value)

operator overload is possible in lua but not for the assignment. So probably 
need to give more thoughts on that later on. But it should be a good start.

> Support TS Stat API in Lua
> --------------------------
>
>                 Key: TS-3346
>                 URL: https://issues.apache.org/jira/browse/TS-3346
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Lua
>            Reporter: Wei Sun
>            Assignee: Kit Chan
>             Fix For: 5.3.0
>
>
> Lua script supports to read/collect error rate, timeout rate, avg latency by 
> origin host.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to