[Gsoc] Usage Tracking Module

classic Classic list List threaded Threaded
26 messages Options
12
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gsoc] Usage Tracking Module

Hi,

I have made the HashTable files. Now, the problem that I am getting is that how am I going to navigate to the user's SciNotes files to track whatever keywords/functions he is using? The command history window only displays the commands which are typed in the Scilab Console Window.
If there is already a module dedicated to tracking the commands used in SciNotes files, then which none is it?

Thank You!

_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hello Diganta,

> If there is already a module dedicated to tracking the commands used in SciNotes files, then which
> none is it?

Hmm, the initial idea was to collect statistics an execution time but statistics at SciNotes edition
time might also be good to have.

SciNotes currently parse the whole file and identify functions through known commands, macros,
variables tables. All this logic is performed on ScilabLexer.java (generated using JFlex with
scilab.jflex).

At first, I suggest you to
 1. setup preferences to add a "do not track" options within Scilab.
 2. implement parser counters for `commands` and `macros` (using a HashMap<String, int>, rather than
a HashSet<String>).
 3. push the counters using google analytics api "Measurement Protocol" (or another provider)

Thanks,

--
Clément
_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

This was the exact guideline I wanted to continue building my Usage Tracking module. One more thing, can I get the module which contains ScilabLexer.java?

Thank You!
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

In reply to this post by Clément David-3
Hi,

I think I got the right one. Just confirming, is it?:

scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/ScilabLexer.java

Thank You!
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Le 21/06/2017 à 21:50, Diganta Dutta a écrit :
> Hi,
>
> I think I got the right one. Just confirming, is it?:
>
> scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/ScilabLexer.java

The Scinotes one is at
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java


_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Thanks a lot for the info

On Jun 22, 2017 1:49 AM, "Samuel GOUGEON [via Scilab / Xcos - Mailing Lists Archives]" <[hidden email]> wrote:
Le 21/06/2017 à 21:50, Diganta Dutta a écrit :
> Hi,
>
> I think I got the right one. Just confirming, is it?:
>
> scilab/modules/helptools/src/java/org/scilab/modules/helptools/scilab/ScilabLexer.java

The Scinotes one is at
scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexer.java


_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc



If you reply to this email, your message will be added to the discussion below:
http://mailinglists.scilab.org/Gsoc-Usage-Tracking-Module-tp4036610p4036622.html
To unsubscribe from [Gsoc] Usage Tracking Module, click here.
NAML
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

In reply to this post by Clément David-3
Hi,

 I have done the first step as told i.e. to give user preferences of 'Track' and 'Do not Track' options. Waiting for the review.

Thank You!
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

In reply to this post by Clément David-3
Hi,

I would like a quick review of the following commits:

1) Created Usage Tracking Preference Setup.
2) Included HashMap representation for Commands and Macros in the UsageTrackingPreference.java module/file.

Thank You!
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi Diganta,

Could please abandon the non-related commits please ? I am currently a bit confused about what are
the valid commits.

Thanks,

--
Clément

Le lundi 26 juin 2017 à 03:23 -0700, Diganta Dutta a écrit :

> Hi, 
>
> I would like a quick review of the following commits:
>
> 1) Created Usage Tracking Preference Setup.
> 2) Included HashMap representation for Commands and Macros in the
> UsageTrackingPreference.java module/file.
>
> Thank You!
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Gsoc-Usage-Tracking-Module-tp4036610p
> 4036666.html
> Sent from the Scilab / GSOC - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> gsoc mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/gsoc
_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

I have abandoned the unrelated commits. The last 2 commits of mine are the ones I want to get a review about.

Thank You!
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

1) Where is the main class for JAVA located in the module scinotes ?

2) I am going through the following file:

scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java

In lines 257 and 282, where are we getting the paramenters 'id' and 'type' from?

3) Also, can you tell me when I set the tokens in a HashMap for Commands and Macros, I also need to have a file that contains a list of all the built-in commands and macros. Is there one present already inside the repository from which the scinotes module refers from?

Thank You!
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hello Diganta,

> 1) Where is the main class for JAVA located in the module scinotes ?


Scilab modules does not have a "main" but rather function entry points called gateways. Each
module can have multiple gateway but for SciNotes there is one `sci_scinotes.cpp` that open the
editor up.

> 2) I am going through the following file:
>
> scilab/modules/scinotes/src/java/org/scilab/modules/scinotes/ScilabLexerConstants.java 
>
> In lines 257 and 282, where are we getting the paramenters 'id' and 'type'
> from? 

I guess you should continue your lookup into the Scinotes source code. The ScilabLexerConstants.java
defined constants used in ScilabLexer.java .

Do not hesitate to use a Java dedicated IDE that can look for usage / definition easily.

> 3) Also, can you tell me when I set the tokens in a HashMap for Commands and
> Macros, I also need to have a file that contains a list of all the built-in
> commands and macros. Is there one present already inside the repository from
> which the scinotes module refers from?

You should not define a file nor hashmap content by yourself ; the commands and macros should be
retrieve when parsing the file.

Thanks,

--
Clément
_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

In reply to this post by Clément David-3
Hi,

My latest commits at Scilab CodeReview Portal are the following:

1) Created Lexer Constants file for Usage Tracking and edited Usage Tracking Preference File

2) Created Lexer files for parsing using HashMap<String, Integer> for Commands and Macros in Usage Tracking
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

I am into the last part of the Usage Tracking Module that is pushing the counters to the Google Analytics API.

1) https://developers.google.com/analytics/devguides/config/mgmt/v3/quickstart/service-java  - This is the Google Analytics API Setup for JAVA Applications portal.

2) https://console.developers.google.com/flows/enableapi?apiid=analytics&credential=client_key - This is the first step.

Can I get an idea about the options I should choose to access it?

Thank You!
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

For implementing Google Analytics, we have to choose between the following:

-> Service Applications
-> Installed Applications
-> Web Server Applications
-> Client-Side Applications

Which one of the 4 should I put SCILAB into? My guess - Installed Applications

Thank You!
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hello Diganta,

I suggest you to use the "Measurement Protocol" API [1] ; this is simple enough and does not need
any Java library support.

This is the simpler protocol with simple "hit" counters ; a Scilab "hit" list can be simply created
using one hit per function to get raw statistics of each function use. Browse the Dev guide [2] to
get the idea of a protocol and start describe the used protocol on an help page.

[1]: https://developers.google.com/analytics/devguides/collection/protocol/v1/
[2]: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide

Thanks,

--
Clément

Le vendredi 30 juin 2017 à 20:51 -0700, Diganta Dutta a écrit :

> Hi,
>
> For implementing Google Analytics, we have to choose between the following:
>
> -> Service Applications
> -> Installed Applications
> -> Web Server Applications
> -> Client-Side Applications
>
> Which one of the 4 should I put SCILAB into? My guess - Installed
> Applications
>
> Thank You!
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Gsoc-Usage-Tracking-Module-tp4036610p
> 4036711.html
> Sent from the Scilab / GSOC - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> gsoc mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/gsoc
_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

I went though the Measurement Protocol API. Looks pretty easy to implement but what is the syntax to implement it in JAVA and how to generate the client ID ?

Thank You!
Clément David-3 Clément David-3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi Diganta,

The tracking ID is linked to the Google Analytics account you use ; at first please use your own and
I will merge using the scilab.org one.

The client ID should be hardcoded in Scilab source code and probably constructed from a
representative Scilab build string to get statistics per version-build.

To get the protocol setup you want, I suggest you tu use the Hit Builder website [1]. It will give
you valid HTTP POST values for some property.

[1]: https://ga-dev-tools.appspot.com/hit-builder/

--
Clément


Le mercredi 05 juillet 2017 à 14:33 -0700, Diganta Dutta a écrit :

> Hi,
>
> I went though the Measurement Protocol API. Looks pretty easy to implement
> but what is the syntax to implement it in JAVA and how to generate the
> client ID ?
>
> Thank You!
>
>
>
> --
> View this message in context: http://mailinglists.scilab.org/Gsoc-Usage-Tracking-Module-tp4036610p
> 4036724.html
> Sent from the Scilab / GSOC - Mailing Lists Archives mailing list archive at Nabble.com.
> _______________________________________________
> gsoc mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/gsoc
_______________________________________________
gsoc mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/gsoc
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module





Now, which option do I choose among those 4? I am not able to decide which one Scilab falls under?
Diganta Dutta Diganta Dutta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Usage Tracking Module

Hi,

I have figured it out and got my ID.

Thank You!
12
Loading...