create_dev_snapview.pl

  • Posted on
  • by
  • in
  • Looked into create_dev_snapview.pl.
  • Tested speeds of FTP vs. SMB

create_dev_snapview.pl

From: Andrew Feltham
Sent: Tuesday, November 15, 2005 3:58 PM
To: Shivdutt Jha
Subject: creating snapshot views

Hi Shivdutt,

so I've tried to use Naga's tool for creating a snapshot view of a particular stream using a variety of incremental baselines.

I've done this using a file generated by Phil's nightly builds (see attached) which lists the specific baseline which was current for each vob.

First of all, it does not seem to work (see image below). I'm not sure I'm handling the composite baseline label properly

Secondly, I do find the tool a bit awkward as it expects me to input several incremental baselines for vobs which are not included in my load rules.

It would be nice if I could specify the vobs on the cmd line, and only provide those labels.

Actually the script is working as designed. The arguments for create_dev_snapview.pl are:

create_dev_snapview.pl <project_name> [ baseline_selector ]

project_name is mandatory but baseline_selector is optional. If you don't specify the baseline_selector then it appears that the script takes all the recommended baselines for all components in the project. Or you can specify a list of baselines if you want different ones. The script checks the number of baselines you specified and compares them to the number of modifiable components in the project. These two numbers must agree.

After painstakingly typing in the command line (wish you would have posted the command line in text! :-( ) and running it through Perl's debugger I came to the realization that you typed in 11 (very long) baselines and there are only 10 modifiable components in the ldx_2.3 project.

In thinking of how to do this better I can think of two methods:

  • Assuming the buildconfig.txt file is a standard file and contains all the information needed, add a -f <buildconfig> option to create_dev_snapview.pl. When present the script would open and parse that file, extracting out the required information. This would help cut down on typing and errors.
  • Modify the script to present a series of dialog boxes prompting for the baseline to use for each component in the project. Note that in this instance this would mean a total of 10 dialog box prompts!

Either of these options can be added to the existing script via options that cause it to operate in a different way if present or to operate like it used to operate if those options are not present.

(Question: When you type "perl" at your command line, what Perl are you running? Because Perl isn't normally present on Windows. Normally people using Clearcase run ccperl...).

FTP vs. SMB

Well this runs contrary to my previous experience but it turns out that a regular file copy using SMB shares is faster than FTP. I tested copying the old 2.7 Gig CQProd2001A database to my desktop, once with FTP and once with SMB. SMB won! Which is surprising to me because last time I tested something like this FTP was up to 10 times faster:

Local:time ftpget -u vobadm -p4sjadm p4test . "/dev/d/CQBackupsfromIrvine/0916/CQProd2001A_db_200509160213.BAK"
CQProd2001A_db_200509160213.BAK           2.66 GB    60.35 kB/s

real               769m10.858s
user               1m29.418s
sys                4m36.387s

Versus:

Local:time cp //p4test/CQBackupsfromIrvine/0916/CQProd2001A_db_200509160213.BAK /tmp

real              532m7.457s
user              0m16.714s
sys               1m11.362s