monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] some observations about roster node IDs


From: Zack Weinberg
Subject: Re: [Monotone-devel] some observations about roster node IDs
Date: Thu, 28 Jun 2007 18:20:01 -0700

On 6/28/07, Derek Scherger <address@hidden> wrote:
I'd be interested in the crazy one-liners... I'm sure they'd be
interesting in their own right.

Well, I'll be helpful, and not write it all on one line for you:

mtn automate select b:net.venge.monotone |
 mtn automate toposort address@hidden |
 (i=1; echo roster type nid
  while read id
  do mtn get_roster $id | sed -ne '
    /file/{
       s/^ *//
       s/ ".*$//
       h
   }
   /dir/{
       s/^ *//
       s/ ".*$//
       h
   }
   /ident/{
       s/^ *ident "//
       s/"$//
       H; g; y/\n/ /; p
   }' | sort -k 1,1 -k 2,2n | sed "s/^/$i /"
  i=$(($i + 1))
  done) > nvm-nids.txt

Replace the first two lines with just

 mtn automate select '' |

if you want the full data set, not just net.venge.monotone.  The
result has three space-separated, labeled columns: an arbitrary number
for the roster, the word 'dir' or 'file' indicating what kind of node,
and the node ID.  This (not accidentally) is the format expected by
R's read.table(, header=T).  You'll want gigs of RAM in order to do
anything useful with it without waiting hours for swap.

I'd also be interested in what you are doing in terms of profiling. I
suspect that my use of raw gprof and oprofile output is rather primitive
but never seem to find time to improve on it. Any chance you would like
to write up a quick summary of what you're doing and stick it in
notes/README.profiling or somewhere. Then anyone else who has other
ideas has somewhere to add them. ;)

I don't have any clever techniques either; oprofile still won't work
for me, so I've just been running
valgrind --tool=callgrind on the scary fast amd64 box and waiting a
couple hours.

zw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]