Russian article about Bazaar
Alexander Belchenko
bialix at ukr.net
Wed Oct 31 13:36:40 GMT 2007
Sandy Dunlop пишет:
> On 31 Oct 2007, at 11:58, Alexander Belchenko wrote:
>
>> Andrew Voznytsa пишет:
>>> You may write trivial application like (C-like Win32-API-like pseudo
>>> code):
>>> main(argc, argv){
>>> StartTime = GetTickCount();
>>> hProcess = CreateProcess(argv[0] /* executable to run */,,,,argc - 1,
>>> argv +
>>> 1,,,,);
>>> WaitForSingleObject(hProcess);
>>> RunTime = GetTickCount() - StartTime;
>>> printf(RunTime / 1000.0);
>>> return GetExitCodeProcess(hProcess);
>>> }
>>> And then simply run "<your app> <app to measure> [<app arg0..N>]"
>>> I wrote something like some time ago while evaluating bzr. But
>>> unfortunately
>>> sources seem to be deleted.
>>> Best regards,
>>> Andrew Voznytsa
>>
>> Thank you, I'll try it.
>
> I would install Cygwin and use the time command, just as if it were a
> Unix system I was recording the time on.
> Writing code to do this seems like re-inventing the wheel, although
> installing Cygwin to solve the problem may be a bit like using a
> sledgehammer to hit a nail.
I don't really like Cygwin, because it's slow.
Writing program based on Andrew's suggestion was very simple,
so here is:
http://www.bialix.com/bzr-win32/timeit.exe
Alexander
More information about the bazaar
mailing list