provide an action for reading statistics information

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

provide an action for reading statistics information

Post by Bushmills » 24 Sep 2014 13:59

Statistics information from menu "Verwalten" -> "Über" can't currently be accessed as characters, therefore no parsing of that data is possible. Providing an action which initializes a named data structure with that data doesn't seem a big deal, and adds to the potential of doing some meta processing using flows. (Martin, I guess by now you know who has discovered the forum requests section :) )

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: provide an action for reading statistics information

Post by Martin » 25 Sep 2014 14:32

How/where would you like to use the statistics information? I could provide one or two script functions to provide the statistics but I'm not sure what format would be helpful. Maybe a map that contains the flow names as a key and the count respectively duration as the value. Would this be helpful or do you have something else in mind?

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: provide an action for reading statistics information

Post by Bushmills » 25 Sep 2014 17:33

An action in the "Initialize variable with ..." section may be least intrusive way to add such a function. Returning the data in a map makes much sense. Maybe have one action, and a checkbox in its setup, allowing to choose flow times or counts to populate the map with. Name of the map is specified in action setup, so one can have two maps, one for times, one for count, if needed. I don't know whether there's any concept of map key order, given that keys are probably hashed. If it is possible to return items sorted, descending order sorted according value, reflecting the display order in the graph, is convenient, so I can produce a list from key names, and either refer to first item only, to first n items, or loop through items for successively lower value.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: provide an action for reading statistics information

Post by Martin » 27 Sep 2014 11:13

Sounds good, I add it to the todo-list.
Automagic internally often uses maps where the keys are stored by insertion order, so I could also provide the map ordered like it's shown in the statistics screen which would allow easy access to the most executed flow.

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: provide an action for reading statistics information

Post by Bushmills » 05 Nov 2014 10:04

A function/action for "Reset Statistics" may complement this.

Locked