[PATCH] performance history specification

John Arbash Meinel john at arbash-meinel.com
Fri Jul 14 05:21:33 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Wed, 2006-07-12 at 14:29 -0500, John Arbash Meinel wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>

...

>> Seems like you are writing a timestamp from epoch time here, rather than
>> a date. It would look nice if you wrote:
>>
>> bench_history.write(time.strftime('--date %Y-%m-%d %H:%M:%S\n'))
>>
>> Or if you want something more official, maybe:
>> bench_history.write('--date %s\n' %
>> 		    (datetime.datetime.utcnow().isoformat(),))
>>
>> But in general, if it is for human viewing time.time() is not very good.
> 
> The file is not for human viewing - its a log file for data gathering.
> time.time() gives seconds since epoch, in UTC, and can be trivially
> formatted into any date when the file is parsed.

Well, I probably wouldn't call it '--date' if you are writing a
timestamp. But I understand its purpose.

...

>> It looks pretty good. The only thing it isn't doing is checking to make
>> sure .perf-history isn't being overwritten.
>> Also, it wasn't clear where it was creating the .perf-history file. I
>> assume you were shooting for putting it inside the project (not the test
>> temp dirs)
>> Which means that .bzrignore should be updated to ignore the newly
>> generated file.
> 
> Good point, +1 on adding an ignore to .bzrignore for .perf-history.
> 
> Yes, it puts it in cwd, which is what the tests test. And you are right,
> we don't test that it appends always. That should be a TODO for the next
> set of performance work related to this.
> 
> That said John, are you happy for this to merge as is (with .bzrignore
> changed)?
> 
> Cheers,
> Rob

Sure. I'd prefer --timestamp, but the real changes I'm +1 on.

Do we want to get this in for 0.9, or should we wait until after? It
seems pretty small, and reasonable to come in.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEtxvNJdeBCYSNAAMRAv1KAKDUWNIjoGrKNlyYNmeiTl5XUIQzpQCgsgPe
jdJvWn4Laiwj7V/xn+eW7I8=
=GSoB
-----END PGP SIGNATURE-----




More information about the bazaar mailing list