BBC BASIC for Windows
« PROFILER UTILITY »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: PROFILER UTILITY  (Read 5802 times)
Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx PROFILER UTILITY
« Thread started on: Apr 29th, 2009, 1:00pm »

Hi all,

I am please to announce PROFILER v2.2b v3.0d
Utility which is available for download here;

http://groups.yahoo.com/group/bb4w/files/Tools/Add_Ins/Profiler%20Utility%20Installer%20v3.0d.exe

Profiler Utility v4.0b (beta) is also available here:
http://groups.yahoo.com/group/bb4w/files/Tools/Add_Ins/Profiler%20Utility%20Installer%20v4.0b.exe

I would be grateful if you could post any comments or criticisms here in this thread so they are all in one place. I have not made any help documentation because I think it is fairly self explanatory but could do if there is a call for it. I am also aware of a few 'style' issues which may or may not please everyone but please do comment if there is any feature you like, or particularly dislike!

I would like to keep developing this utility so all comments are welcome.

Lastly, I do not think there are any major bugs, the big issues being ironed out in development but please report anything you may suspect.

Michael
« Last Edit: Oct 12th, 2010, 5:28pm by Michael Hutton » User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: PROFILER UTILITY
« Reply #1 on: Apr 29th, 2009, 10:38pm »

It seems to be working well so far, having tried it with a few programs. I found that when installing I had to create a new folder within the BBC BASIC for Windows folder called UTILITIES; hardly a chore to be sure, but perhaps the next version of PROFILER could, if it detects that the required folder doesn't exist, create it automatically?

Anyway, a useful and conveniently accessible utility building on the Richard's original proggy. It is certainly one I will use myself (I've used Richard's original version a few times already).

An idea: (I haven't thought this through, so feel free to dismiss it out of hand!)... sometimes one may not want to profile the whole program, but rather a specific loop or the main program loop, or whathaveyou. So, perhaps a later version of PROFILER could hold off profiling until it encounters a directive such as:

REM!PROFILERGO

(or something like that?).


Good work Michael, as usual.


David.
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #2 on: Apr 30th, 2009, 02:08am »

Thanks David,

The directory issue is an obvious bug which Knud has also reported. Thanks. I had always worked with a already created folder, which I just hadn't realised. I will correct that this week. Typical.

I had thought of just profiling sections of code. I don't think that actually should be too much of a problem. However, my concerns, and I don't know if they a real or not, is that I don't want the TimerProc to become too unwieldy. It is called every millisecond and I am presuming the shorter the better. I look into this feature.

Richard has also pointed out that my testing of the 'immediate mode' is probably working by sheer chance rather than any concrete evidence. He has supplied me with a way of testing it which I will incorporate.

Thank you for taking the time and testing it. The directory issue is a bit embarrassing but typical of me.

There are of course other issues which I am working on. I am looking at trying to reliably detect when the program is waiting for input from the user in a GET or INKEY statement so when the close is pressed it will exit wihout the user having to press ENTER.

Knud has also reported a Division by Zero error which I will track down aswell.

Look forward to version 2.2c soon!

Michael
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #3 on: May 1st, 2009, 05:58am »

For those of you who have tried using PROFILER v2.2b and are having problems with a installing it to a new directory. The problem lies with trying to create a subdirectory of a directory which doesn't exist.

I had used *MKDIR (OSCLI) but this will fail if an intermediate directory in the path doesn't already exist.

*MKDIR seems to map directly to SYS"CreateDirectory"

I will fix this problem.

Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: PROFILER UTILITY
« Reply #4 on: May 1st, 2009, 09:11am »

Quote:
I had used *MKDIR (OSCLI) but this will fail if an intermediate directory in the path doesn't already exist.

You should probably use SYS "SHFileOperation" for this kind of thing, because it can automatically create the directory tree required to store a file. What you definitely should not be doing is to call MKDIR repeatedly to create the tree; let Windows do the hard work for you!

Richard.
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #5 on: May 2nd, 2009, 11:47am »

I have corrected the directory installation bug. I have called it version 2.2c although the actual profiler itself is the same. You can download it from the same link (in the first message).

In fact I had done precisely what you recommended not doing and went and created a function to solve the problem with *MKDIR but I have now scrubbed that and use SHFileOperation. I had used it before but had completely forgotten about it. rolleyes

Hope this is a bit better.

Michael
User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: PROFILER UTILITY
« Reply #6 on: May 2nd, 2009, 10:32pm »

Michael,

Hmm... was thinking... if you have the time and inclination, -- if you think it's worthwhile -- then perhaps Richard's tokenized .BBC file to HTML file converter could be implemented as an IDE utility? (Admittedly, I've probably used that bbc2html program more than anyone else.)


Regards,

David.
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #7 on: May 7th, 2009, 10:06am »

David,

It would probably be quite easy to do but as you may have seen I've been getting bogged down in sorting out bugs in Profiler which have come to light...

I will definitely have a look at doing it for you. It would probably be good to ignore Profiler for a week and then get back to it later...

Michael
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #8 on: May 7th, 2009, 10:51am »

Ah! And now I know how to indent the report in Profiler! It's all in BBCtoHTML. Hah!

Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: PROFILER UTILITY
« Reply #9 on: May 7th, 2009, 2:37pm »

Quote:
perhaps Richard's tokenized .BBC file to HTML file converter could be implemented as an IDE utility?

I don't want to be a wet blanket here, but I feel I should point out that adapting BBC2HTML.BBC, not being one of the supplied example programs, would require my permission. You can't just go and take a program I have written, the IPR/Copyright of which is owned by me, and turn it into an add-in utility without seeking my approval!

Richard.
User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: PROFILER UTILITY
« Reply #10 on: May 7th, 2009, 3:25pm »

on May 7th, 2009, 2:37pm, Richard Russell wrote:
I don't want to be a wet blanket here, but I feel I should point out that adapting BBC2HTML.BBC, not being one of the supplied example programs, would require my permission. You can't just go and take a program I have written, the IPR/Copyright of which is owned by me, and turn it into an add-in utility without seeking my approval!

Richard.


Sorry, it was rather presumptuous of me!
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #11 on: May 22nd, 2009, 11:23am »

Hi all,

You can run the installer by clicking on this link and choosing RUN.

http://tech.groups.yahoo.com/group/bb4w/files/Tools/Add_Ins/Profiler%20Utility%20Installer.exe

For those of you who are aware of the previous versions potentially lethal bug
this has been fixed by using an updated version of the bbwrun.exe provided by
Richard. So, DO NOT BE AFRAID!

To use profiler just select the item from the Utilities menu. You should see a
dialogue box appear with a few options. In brief:

Autoclose : Enter a timeout value for the profiling to exit. A value of 0
indicates that there is no timeout value and the program will profile
indefinitely...see 'exit conditions' below.

Do not time INPUT statements : Profiler will ignore INPUT statements and not
time them when profiling.

Profiler will automatically stop the profiling and show you a report when:

1. The timeout limit has been reached.
2. An END or QUIT statement has been encountered. (a STOP will bail to immediate
mode see 3)
3. When immediate mode is detected.
4. The user clicks on the close button in the window (if your using full screen
use Alt-f4).

I haven't encountered a situation where this version will not exit in immediate
mode but if anyone does find this or it seems 'stuck' when an INPUT statemant,
click the close button and then press ENTER. This is similar behaviour to the
original profiler.

The profile report will be shown in your default text editor. The file will not
be saved unless you do so manually. (it is created in the temp directory.)

There have been other minor bug fixes including the 'Division by zero' error
encountered when the program was so small that no time was registered by
Profiler.

I have noticed that *rarely* profiler will not show a report when the program
being profiled is deep within a machine code procedure (I think). I think this
is due to so many WM_QUIT messages being sent that it will close itself before
it's had time to compile the report and show it! As the first thing Profiler
does is stop the timer when it has encountered a stop condition I haven't really
worked out a way of stopping this behaviour yet. Although I could stop it within
the timer itself...<will go away and do this....>. However, I think it is
satisfactory for 99.9% of situations.

Also the installer might not recongise previous versions (you shouldn't have
them anyway!) but just select the same slot if this does occur.

As per usual please report any bugs or irritations.

Enjoy profiling! I hope it helps to speed up your code.

Michael


User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: PROFILER UTILITY
« Reply #12 on: May 27th, 2009, 2:47pm »

Quote:
As per usual please report any bugs or irritations.

If I try to install your latest Profiler Utility I get this message in a box entitled 'Access Denied':

"Sorry, you are not allowed to write to this folder. You will have to change your access rights to this folder then run this installer again".

Unfortunately, it doesn't tell me which folder I need to change the access rights to (nor why, since I wouldn't be expecting it to write to a folder that doesn't have write access).

Also, for your information, the message box was displayed behind other windows - only the 'bong' alerted me to a problem. You should perhaps check that you have set the 'parent window' of the box correctly. Or maybe consider setting the MB_TOPMOST flag.

Richard.
« Last Edit: May 27th, 2009, 2:48pm by admin » User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: PROFILER UTILITY
« Reply #13 on: Jun 2nd, 2009, 10:26am »

The 'Access Denied' Updating bug has been fixed for those of you who would like to try Profiler.

Also, I would recommend using the Install/Remove/Update tool to remove Profiler. If you just delete the files you will leave the registry entries behind which could confuse any further attempts to upgrade etc.

Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: PROFILER UTILITY
« Reply #14 on: Jun 2nd, 2009, 1:49pm »

Quote:
Also, I would recommend using the Install/Remove/Update tool to remove Profiler.

Can you confirm that it's equally acceptable to use the Remove option in Malcolm's Utilities Manager? I think it's most important that utilities from different vendors properly coöperate.

By the time the average user decides they want to remove your utility (possibly a long time after they first installed it) they're unlikely to remember that they're supposed to use a particular software tool to do it. Even if they do, they've got to remember what it's called and where they stored it (and if, like me, they run it directly from the Yahoo group's Files area it won't be on their PC anyway).

If for some reason you cannot make your utility compatible with Utilities Manager (which seems unlikely) a less desirable alternative would be to put an entry in the Add or Remove Programs list in Control Panel so it can be removed in the same way as other Windows applications.

Richard.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls