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

Kit Chan edited comment on TS-3346 at 2/7/15 11:26 PM:
-------------------------------------------------------

[~zwoop] , that's true. Perhaps we can name them as "int" version at this 
point. 
Also, increment and decrement TS APIs take an "amount" value as well.

ts.stat_int_create("some_counter", persistence, sync)
ts.stat_int_increment("some_counter", amount)
ts.stat_int_decrement("some_counter", amount)
ts.stat_int_get("some_counter")
value = ts.stat_int_set("some_counter")

perisistence can be 
TS_LUA_STAT_PERSISTENT,
TS_LUA_STAT_NON_PERSISTENT

sync can be 
TS_LUA_STAT_SYNC_SUM,
TS_LUA_STAT_SYNC_COUNT,
TS_LUA_STAT_SYNC_AVG,
TS_LUA_STAT_SYNC_TIMEAVG


was (Author: kichan):
[~zwoop] , that's true. Perhaps we can name them as "int" version at this 
point. 
Also, increment and decrement TS APIs take an "amount" value as well.

ts.stat_int_create("some_counter", type, persistence, sync)
ts.stat_int_increment("some_counter", amount)
ts.stat_int_decrement("some_counter", amount)
ts.stat_int_get("some_counter")
value = ts.stat_int_set("some_counter")

perisistence can be 
TS_LUA_STAT_PERSISTENT,
TS_LUA_STAT_NON_PERSISTENT

sync can be 
TS_LUA_STAT_SYNC_SUM,
TS_LUA_STAT_SYNC_COUNT,
TS_LUA_STAT_SYNC_AVG,
TS_LUA_STAT_SYNC_TIMEAVG

> 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