You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vladimir Shun'kov <sh...@gmail.com> on 2012/06/12 11:21:11 UTC
Commit size
Hello,
Could you please help me with issue. Is it real to get commit size of
user for statistic?
Thank you.
Best regards,
Vlad.
Re: Commit size
Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Chris Evans,
am Dienstag, 12. Juni 2012 um 13:09 schrieben Sie:
> If you still want some stats/reports from commits Atlassian Fisheye
> will do it based of lines of code
> http://www.atlassian.com/software/fisheye/overview/analyze-source
I played a little with StatSVN which focuses on statistics and is
relatively easy to setup.
http://statsvn.org/
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme http://www.AM-SoFT.de/
Telefon.............030-2 1001-310
Fax...............05151- 9468- 88
Mobil..............0178-8 9468- 04
AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow
RE: Commit size
Posted by Chris Evans <ch...@gresearch.co.uk>.
> -----Original Message-----
> From: Andy Levy [mailto:andy.levy@gmail.com]
> Sent: 12 June 2012 11:31
> To: Vladimir Shun'kov
> Cc: users@subversion.apache.org
> Subject: Re: Commit size
>
> On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov <sh...@gmail.com>
> wrote:
> > Hello,
> >
> > Could you please help me with issue. Is it real to get commit size of
> > user for statistic?
>
> How are you measuring size? Bytes? Lines? Number of files? And to what
> end?
>
> There are a lot of problems around measuring user activity by this sort
> of statistic. It's easily gamed, tends to ignore the effects of improving
> code in many ways[1], and in the case of binary files, it's pretty much
> meaningless.
>
> 1: http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt
If you still want some stats/reports from commits Atlassian Fisheye will do it based of lines of code http://www.atlassian.com/software/fisheye/overview/analyze-source
*bypass*
Re: Commit size
Posted by Daniel Shahaf <da...@elego.de>.
Johan Corveleyn wrote on Wed, Jun 13, 2012 at 15:32:56 +0200:
> On Wed, Jun 13, 2012 at 3:16 PM, Vladimir Shun'kov <sh...@gmail.com> wrote:
> > Would be enough have the number bytes of changes. I did disk usage in
> > pre-commit hook and disk usage in post-commit hook and then calculated
> > the difference. But I commited the new file with size 20Kb and size of
> > commit I recieved only 5Kb due some svn compression I guess.
>
> In 1.7, there's a new svnlook subcommand: 'svnlook filesize'. This can
> give you the filesize of any file (from a revision or a transaction),
> without having to 'svnlook cat' it (i.e. more efficiently).
>
> Maybe you can use that directly, or use it to calculate the difference?
>
> Like, in the pre-commit hook:
>
> 1) 'svnlook changed -t $TXN $REPOS' to get the list of changes in this
> transaction
>
> 2) For every changed (or added) file, do 'svnlook filesize -t $TXN $REPOS'
>
> 3) For changed files, compare them to 'svnlook filesize -r $YOUNGEST
> $REPOS' where $YOUNGEST is the result of 'svnlook youngest $REPOS'.
>
> 4) Do some arithmetic on the result
>
$TXN may be based on a revision earlier than $YOUNGEST, and the file may
have changed between that base revision and youngest. If that happens,
the commit attempt will fail due to a conflict, but before that happens
the logic above would make calculations based on the wrong information.
I don't know if there is an svnlook API to print the base revision of
a given txn... but I guess there should be.
> HTH
> --
> Johan
Re: Commit size
Posted by Johan Corveleyn <jc...@gmail.com>.
On Wed, Jun 13, 2012 at 3:16 PM, Vladimir Shun'kov <sh...@gmail.com> wrote:
> Would be enough have the number bytes of changes. I did disk usage in
> pre-commit hook and disk usage in post-commit hook and then calculated
> the difference. But I commited the new file with size 20Kb and size of
> commit I recieved only 5Kb due some svn compression I guess.
In 1.7, there's a new svnlook subcommand: 'svnlook filesize'. This can
give you the filesize of any file (from a revision or a transaction),
without having to 'svnlook cat' it (i.e. more efficiently).
Maybe you can use that directly, or use it to calculate the difference?
Like, in the pre-commit hook:
1) 'svnlook changed -t $TXN $REPOS' to get the list of changes in this
transaction
2) For every changed (or added) file, do 'svnlook filesize -t $TXN $REPOS'
3) For changed files, compare them to 'svnlook filesize -r $YOUNGEST
$REPOS' where $YOUNGEST is the result of 'svnlook youngest $REPOS'.
4) Do some arithmetic on the result
HTH
--
Johan
Re: Commit size
Posted by Vladimir Shun'kov <sh...@gmail.com>.
Would be enough have the number bytes of changes. I did disk usage in
pre-commit hook and disk usage in post-commit hook and then calculated
the difference. But I commited the new file with size 20Kb and size of
commit I recieved only 5Kb due some svn compression I guess.
Thank you.
Vlad.
2012/6/12 Cooke, Mark <ma...@siemens.com>:
> [Please add your reply at the bottom, it makes it easier to read]
>
>> > 2012/6/12 Andy Levy <an...@gmail.com>:
>> >> On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov
>> <sh...@gmail.com> wrote:
>> >>> Hello,
>> >>>
>> >>> Could you please help me with issue. Is it real to get
>> >>> commit size of user for statistic?
>> >>
>> >> How are you measuring size? Bytes? Lines? Number of files?
>> >> And to what end?
>> >>
>> >> There are a lot of problems around measuring user activity by this
>> >> sort of statistic. It's easily gamed, tends to ignore the
>> >> effects of improving code in many ways[1], and in the case of
>> >> binary files, it's pretty much meaningless.
>> >>
>> >> 1:
>> >> http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt
>>
>> On Tue, Jun 12, 2012 at 7:55 AM, Vladimir Shun'kov
>> <sh...@gmail.com> wrote:
>> > Hello,
>> >
>> > I need measure in bytes. I tried use pre-commit and
>> > post-commit hooks but I received not real size of
>> > commit due svn uses some compression.
>>
> ...but what do you consider to be the "real size of commit" ~ the number of bytes of ...all affected files / ...just the changes / ...something completely different?
>
> What are you _actually_ trying to measure (and why)? Without knowing this, we cannot help you.
>
> Note: Subversion does not send all of the file(s), only the diffs (which includes all the file if new, of course!). This helps reduce network traffic and time.
>
> ~ mark c
RE: Commit size
Posted by "Cooke, Mark" <ma...@siemens.com>.
[Please add your reply at the bottom, it makes it easier to read]
> > 2012/6/12 Andy Levy <an...@gmail.com>:
> >> On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov
> <sh...@gmail.com> wrote:
> >>> Hello,
> >>>
> >>> Could you please help me with issue. Is it real to get
> >>> commit size of user for statistic?
> >>
> >> How are you measuring size? Bytes? Lines? Number of files?
> >> And to what end?
> >>
> >> There are a lot of problems around measuring user activity by this
> >> sort of statistic. It's easily gamed, tends to ignore the
> >> effects of improving code in many ways[1], and in the case of
> >> binary files, it's pretty much meaningless.
> >>
> >> 1:
> >> http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt
>
> On Tue, Jun 12, 2012 at 7:55 AM, Vladimir Shun'kov
> <sh...@gmail.com> wrote:
> > Hello,
> >
> > I need measure in bytes. I tried use pre-commit and
> > post-commit hooks but I received not real size of
> > commit due svn uses some compression.
>
...but what do you consider to be the "real size of commit" ~ the number of bytes of ...all affected files / ...just the changes / ...something completely different?
What are you _actually_ trying to measure (and why)? Without knowing this, we cannot help you.
Note: Subversion does not send all of the file(s), only the diffs (which includes all the file if new, of course!). This helps reduce network traffic and time.
~ mark c
Re: Commit size
Posted by Andy Levy <an...@gmail.com>.
Please use Reply To All to keep discussion on the list.
On Tue, Jun 12, 2012 at 7:55 AM, Vladimir Shun'kov <sh...@gmail.com> wrote:
> Hello,
>
> I need measure in bytes. I tried use pre-commit and post-commit hooks
> but I received not real size of commit due svn uses some compression.
>
>
> 2012/6/12 Andy Levy <an...@gmail.com>:
>> On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov <sh...@gmail.com> wrote:
>>> Hello,
>>>
>>> Could you please help me with issue. Is it real to get commit size of
>>> user for statistic?
>>
>> How are you measuring size? Bytes? Lines? Number of files? And to what end?
>>
>> There are a lot of problems around measuring user activity by this
>> sort of statistic. It's easily gamed, tends to ignore the effects of
>> improving code in many ways[1], and in the case of binary files, it's
>> pretty much meaningless.
>>
>> 1: http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt
Re: Commit size
Posted by Andy Levy <an...@gmail.com>.
On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov <sh...@gmail.com> wrote:
> Hello,
>
> Could you please help me with issue. Is it real to get commit size of
> user for statistic?
How are you measuring size? Bytes? Lines? Number of files? And to what end?
There are a lot of problems around measuring user activity by this
sort of statistic. It's easily gamed, tends to ignore the effects of
improving code in many ways[1], and in the case of binary files, it's
pretty much meaningless.
1: http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt