[ 
https://issues.apache.org/jira/browse/TS-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sudheer Vinukonda updated TS-3881:
----------------------------------
    Description: 
I'd like to add a new API TSHttpTxnCacheStateGet() to be able to get more 
insight into cache operations (e.g read_while_write, open read tries, open 
write tries, cache volume used etc) on a given Txn. 

Below's the proposal with the info I'd like the new API return along with the 
API signature.

Please provide comments/suggestions.

{code}
+typedef enum {
+  TS_CACHE_TXN_STATE_HIT_RAM,
+  TS_CACHE_TXN_STATE_READ_WHILE_WRITER,
+  TS_CACHE_TXN_STATE_OPEN_READ_TRIES,
+  TS_CACHE_TXN_STATE_OPEN_WRITE_TRIES,
+  TS_CACHE_TXN_STATE_CACHE_VOLUME,
+  TS_CACHE_TXN_STATE_LAST_ENTRY
+} TSCacheTxnStateKey;
+

+/* Get Cache Lookup state, useful for understanding how a lookup was performed 
*/
+/**
+   Return the particular cache lookup info requested.
+
+   @param txnp the transaction pointer
+   @param key the requested cache lookup info.
+   @param TSMgmtInt a pointer to a integer where we will store the metric value
+
+   @return @c TS_SUCCESS if the metric is supported, TS_ERROR otherwise
+
+*/
+tsapi TSReturnCode TSHttpTxnCacheStateGet(TSHttpTxn txnp, TSCacheTxnStateKey 
key, TSMgmtInt *value);

{code}
+


  was:
I'd like to add a new API TSHttpTxnCacheStateGet() to be able to get more 
insight into cache operations (e.g read_while_write, open read tries, open 
write tries, cache volume used etc) on a given Txn. 

Below's the proposal with the info I'd like the new API return along with the 
API signature.

Please provide comments/suggestions.

{code}
+typedef enum {
+  TS_CACHE_TXN_STATE_HIT_RAM,
+  TS_CACHE_TXN_STATE_READ_WHILE_WRITER,
+  TS_CACHE_TXN_STATE_OPEN_READ_TRIES,
+  TS_CACHE_TXN_STATE_OPEN_WRITE_TRIES,
+  TS_CACHE_TXN_STATE_CACHE_VOLUME,
+  TS_CACHE_TXN_STATE_LAST_ENTRY
+} TSCacheTxnStateKey;
+

+/* Get Cache Lookup state, useful for understanding how a lookup was performed 
*/
+/**
+   Return the particular cache lookup info requested.
+
+   @param txnp the transaction pointer
+   @param key the requested cache lookup info.
+   @param TSMgmtInt a pointer to a integer where we will store the metric value
+
+   @return @c TS_SUCCESS if the metric is supported, TS_ERROR otherwise
+
+*/
+tsapi TSReturnCode TSHttpTxnCacheStateGet(TSHttpTxn txnp, TSCacheStateKey key, 
TSMgmtInt *value);

{code}
+



> new TS API TSHttpTxnCacheStateGet
> ---------------------------------
>
>                 Key: TS-3881
>                 URL: https://issues.apache.org/jira/browse/TS-3881
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: TS API
>            Reporter: Sudheer Vinukonda
>            Assignee: Sudheer Vinukonda
>
> I'd like to add a new API TSHttpTxnCacheStateGet() to be able to get more 
> insight into cache operations (e.g read_while_write, open read tries, open 
> write tries, cache volume used etc) on a given Txn. 
> Below's the proposal with the info I'd like the new API return along with the 
> API signature.
> Please provide comments/suggestions.
> {code}
> +typedef enum {
> +  TS_CACHE_TXN_STATE_HIT_RAM,
> +  TS_CACHE_TXN_STATE_READ_WHILE_WRITER,
> +  TS_CACHE_TXN_STATE_OPEN_READ_TRIES,
> +  TS_CACHE_TXN_STATE_OPEN_WRITE_TRIES,
> +  TS_CACHE_TXN_STATE_CACHE_VOLUME,
> +  TS_CACHE_TXN_STATE_LAST_ENTRY
> +} TSCacheTxnStateKey;
> +
> +/* Get Cache Lookup state, useful for understanding how a lookup was 
> performed */
> +/**
> +   Return the particular cache lookup info requested.
> +
> +   @param txnp the transaction pointer
> +   @param key the requested cache lookup info.
> +   @param TSMgmtInt a pointer to a integer where we will store the metric 
> value
> +
> +   @return @c TS_SUCCESS if the metric is supported, TS_ERROR otherwise
> +
> +*/
> +tsapi TSReturnCode TSHttpTxnCacheStateGet(TSHttpTxn txnp, TSCacheTxnStateKey 
> key, TSMgmtInt *value);
> {code}
> +



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

Reply via email to