This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222841

Summary: Log usage of external versioning commands
Product: versioncontrol Reporter: Petr Cyhelsky <cyhelsky>
Component: CodeAssignee: Ondrej Vrabec <ovrabec>
Status: RESOLVED FIXED    
Severity: normal CC: jtulach, thurka
Priority: P3 Keywords: PERFORMANCE
Version: 7.3   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 223167    
Bug Blocks: 223819    

Description Petr Cyhelsky 2012-11-27 15:55:37 UTC
The logging of external versioning commands is needed for analysis of usage patterns of versioning.
Comment 1 Ondrej Vrabec 2012-11-30 11:31:37 UTC
So, let's sum up.
1) Events will be logged for Mercurial and Git, i am unable to do it for Subversion
2) Only commands touching repository metadata and files in working copy will be logged (update, revert, fetch, but also update which does not affect files in a working copy - and their git equivalents). Basically i will log situations when .hg/wlock is created -> something is happening -> .hg/wlock is deleted
3) Only commands running longer than 3s will be logged
4) Internal commands (actions running from within the IDE) will also be logged with additional information of what command is invoked
5) Logged record will contain: message "USG_VCS_CMD" with additional parameters vcs(0), time(1), modifications(2), command(3) and external(4), where
> 0 - version control kind: HG/GIT
> 1 - time in millis between .hg/wlock creation and deletion
> 2 - number of touched files in the working copy during command's execution
> 3 - name of the invoked command (in case of internal actions) or UNKNOWN in case of an external command
> 4 - TRUE if run in commandline, FALSE if run from within the IDE
Any other requests?
Comment 2 Tomas Stupka 2012-11-30 12:04:23 UTC
> 3) Only commands running longer than 3s will be logged
why  3s? wasn't it said (by Tomas Hurka) that one of the goals is to figure out how often it happens that users invoke commands externally.
Comment 3 Tomas Hurka 2012-11-30 13:04:27 UTC
(In reply to comment #2)
> > 3) Only commands running longer than 3s will be logged
> why  3s? wasn't it said (by Tomas Hurka) that one of the goals is to figure out
> how often it happens that users invoke commands externally.
Yes, but on the other hand, Ondra was afraid that logs can grow too much. So we are trying to skip those short-lived commands, which are not very important.
Comment 4 Ondrej Vrabec 2012-12-04 10:50:40 UTC
fix: http://hg.netbeans.org/core-main/rev/54ea3d3bf03f
Comment 5 Quality Engineering 2012-12-05 02:57:48 UTC
Integrated into 'main-golden', will be available in build *201212050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/54ea3d3bf03f
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #222841 - Log usage of external versioning commands
adding logging of external and internal git and hg commands
Comment 6 Ondrej Vrabec 2012-12-06 10:56:01 UTC
fix: http://hg.netbeans.org/core-main/rev/59e669f7dedc
Comment 7 Quality Engineering 2012-12-08 02:57:59 UTC
Integrated into 'main-golden', will be available in build *201212080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/59e669f7dedc
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: #222841 - Log usage of external versioning commands
listening for external hg command more reliable, it should be detected even when the IDE filesystem does not deliver events about wlock file being created