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

Eric Balsa commented on TS-157:
-------------------------------

I dont understand why the global struct is using <string,long> rather than 
<int, long> where int is the key from your struct that "maintains the mapping 
from stat number to stat name".

"A global structure std::map<std::string, long> is used by the Stat collector 
to store stats after collecting them from all threads. Key - stat name. Value - 
stat value (global_stats_map)" 

Further, what if your global entries were simplified into a single hash map 
rather than 2? something like:

map<int, {string name, long collected_count, ...} >

IOW: 1 global structure holding int as key and some struct with your arbitrary 
name and the current collected count. It seems you never really operate on the 
"name", but only the integer key so i dont get the two global maps?

> Improve stats API
> -----------------
>
>                 Key: TS-157
>                 URL: https://issues.apache.org/jira/browse/TS-157
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Stats
>            Reporter: Raghav Jeyaraman
>            Assignee: Raghav Jeyaraman
>
> As it stands today, traffic server limits the number of stats that can be 
> registered to 250. 
> The code must be changed to allow a large number of stats (100000)  to be 
> tracked.
> The API for adding coupled stats is cumbersome to use and as a result, has 
> very few users. Current stats API must be cleaned up or gotten rid of.
> Thanks,
> --raghav

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to