Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listener to add/remove Accumulators #130

Open
marlonpatrick opened this issue Mar 2, 2017 · 4 comments
Open

Listener to add/remove Accumulators #130

marlonpatrick opened this issue Mar 2, 2017 · 4 comments

Comments

@marlonpatrick
Copy link
Contributor

Is there any listener for add / remove Accumulators currently?

I am wanting to create Producers based on Accumulators. The idea is to generate Min, Max, Avg values ​​for a given Accumulator. For this, I would need to read all the values ​​within an Accumulator and generate such information.

In fact, I think this would be an excellent built-in feature for the Moskito. Something like:

"@accumulators":[
  {
    "name": "SessionCountCur-5m",
    "producerName": "SessionCount",
    "statName": "Sessions",
    "valueName": "cur",
    "intervalName": "5m",
    "registerProducer": true     <<<----------
  }}

Obviously, this could and should be done directly in Producer, however, it is not always simple because you would have to rewrite the code.

Generating from an Accumulator, it would be possible to measure this data for any Stats without needing to rewrite code. In addition, it would be possible to do this within a range determined by the user (accumulationAmount).

@dvayanu
Copy link
Member

dvayanu commented Mar 3, 2017

Hi Marlon,
do I understand you correctly that you want to register a new producer that corresponds to an accumulator? And then what? I mean accumulators have their values from producers, so this new producer will only have the same values the original producer had. Or do I understand it wrong?
There is a producer SessionCount already.
There is an accumulator SessionCountCur-5m.
So if we now add a new producer, SessionCountCur-5m, what values would it hold?
Lets say in 5m intervals we have values of 1000, 1200, 1500, 1200, 900 as SessionCount.Sessions.
So lets say the volatility is 5%.
So the producer values would be:

Time passed Min Cur Max
5m 950 1000  1050
10m 1140  1200 1260
15m 1425  1500 1575
20m 1140  1200 1260
25m 855  900 945

The values in the accumulator will be:

Timestamp Value
0+5m 1000
0+10m 1200
0+15m 1500
0+20m 1200
0+25m 900

So now the question: What values does the SessionCountCur-5m contain?
Or did I understood you completely wrong? :-)

@marlonpatrick
Copy link
Contributor Author

Hi, Leon.

Next, I'm going to use Moskito as well to help me measure the size of my environment. For example, how much do I need memory (OS, heap, non-heap), how many users should I support on average? What is my peak of users? Etc. etc.

So I've been trying to generate Min, Max, and Avg values ​​for most metrics. The first way to do this is to create your own Producer and include the missing values, which becomes more laborious.

But if we look closely, the Accumulators have everything we need to generate this information: min, max, avg. They have a list of values ​​of a given Producer / Value, at a given time.

So, taking your example, I would actually like through Accumalor to get the following values:
Min: 900
Max: 1500
Avg: 1160

That way, I would not have to create a new Producer just to extract this data.

Well then at that point if I had some way to intercept the creation / removal of Accumulators I could create a Producer to generate those statistics using Accumulators values.

And maybe, sometime in the future, this option could be out of the box in the Moskito.

Did you understand better? Does it make any sense to you?

@Bezuhlyi
Copy link
Contributor

Bezuhlyi commented Mar 9, 2017

@marlonpatrick10 Did I get it right that in general, you want to see the result(s) of some function(s) applied to the values on the timeline of a certain Accumulator?

@marlonpatrick
Copy link
Contributor Author

marlonpatrick commented Apr 27, 2017

Sorry for the delay @Bezuhlyi, yes it would be something in that line of thought.

Or you could add this simple information to the Accumulators screen. Currently we have Name, Path, Values ​​(quantity of values) and Last Timestamp. It could be added for quick viewing fields like:

Min / Max / Avg: lowest / highest / average value from current values

Aboslute Min / Max / Avg: lowest / highest / average value among all values ​​including values ​​already discarded

image

In my case, in possession of this information, I would use such values ​​(Min / Max / Avg) to help me measure the amount of resources needed for my environment.

The best thing is that I could have this set of values ​​for any existing metrics, just create an accumulator that meets my needs.

Today if I need to know how to get Min / Max / Avg for most statistics I will need to write a Producer that contains such data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants