Purefiler - An alternative profiler

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

In your user-folder (home-directory) you should find a folder named "Purefiler". Any profile-run leaves 2 files in there.
Can you find this?
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

A new version is online. When Purefiler is executed in pre-processor-mode (when you build an executable with the tool enabled) there's a messagerequester opened initially where you can choose if you want to compile with Purefiler code or without. So, when you don't see this messagerequester then something happened on the way. :|
Go, tell it on the mountains.
Starwolf20
User
User
Posts: 25
Joined: Fri Sep 04, 2009 7:08 pm
Location: Corsica

Re: Purefiler - An alternative profiler

Post by Starwolf20 »

Hi Didelphodon
I have a bug : Some timings appears to be negative

For example :
File line Hits Time (ms)
1 1 1 -0.000337 a=0
1 2 For i = 1 to 100
1 3 100 -0.032313 a=a+1
1 4 next i



Nb : PB 4.51 on a I5 760 & XP
User avatar
Michael Vogel
Addict
Addict
Posts: 2677
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Purefiler - An alternative profiler

Post by Michael Vogel »

If you compile the following and call it Purefiler.exe you can see if %COMPILEFILE is working...

Code: Select all

MessageRequester("Tool Tester",PeekS(GetCommandLine_()))
Maybe it would be easier to be able to do some simple configuraions (enable/disable the Purefiler and set the working directory) in a dialog which can be available when starting the program without any parameter. The settings can be saved even in the purebasic.prefs)
So you would not have to set the mode each time you create an exe file :wink:

Michael

PS when using EnableExplicit I get an error that Purefilervar has to be defined?!
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Starwolf20 wrote:Hi Didelphodon
I have a bug : Some timings appears to be negative

For example :
File line Hits Time (ms)
1 1 1 -0.000337 a=0
1 2 For i = 1 to 100
1 3 100 -0.032313 a=a+1
1 4 next i



Nb : PB 4.51 on a I5 760 & XP
Hm, that's kinda strange - can you post the code with which you tested?
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Michael Vogel wrote:If you compile the following and call it Purefiler.exe you can see if %COMPILEFILE is working...

Code: Select all

MessageRequester("Tool Tester",PeekS(GetCommandLine_()))
Thx for the tip! In the meantime I already added some messagebox at the beginning of pre-processing (build) with which you can decide if to build with or without Purefiler.
Michael Vogel wrote: Maybe it would be easier to be able to do some simple configuraions (enable/disable the Purefiler and set the working directory) in a dialog which can be available when starting the program without any parameter. The settings can be saved even in the purebasic.prefs)
So you would not have to set the mode each time you create an exe file :wink:
See above quote - but indeed, it might be smart to make the working directory (or storing directory) adjustable. I'll keep that in mind.

Michael
Michael Vogel wrote:PS when using EnableExplicit I get an error that Purefilervar has to be defined?!
Hm, that's an issue. I will work that out.

Thx for the feedback!
Go, tell it on the mountains.
Starwolf20
User
User
Posts: 25
Joined: Fri Sep 04, 2009 7:08 pm
Location: Corsica

Re: Purefiler - An alternative profiler

Post by Starwolf20 »

Didelphodon wrote: Hm, that's kinda strange - can you post the code with which you tested?
It's only few lines to show the pb



a=0
For i=1 To 100
a=a+1
Next i
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Didelphodon wrote:
Michael Vogel wrote:If you compile the following and call it Purefiler.exe you can see if %COMPILEFILE is working...

Code: Select all

MessageRequester("Tool Tester",PeekS(GetCommandLine_()))
Thx for the tip! In the meantime I already added some messagebox at the beginning of pre-processing (build) with which you can decide if to build with or without Purefiler.
Michael Vogel wrote: Maybe it would be easier to be able to do some simple configuraions (enable/disable the Purefiler and set the working directory) in a dialog which can be available when starting the program without any parameter. The settings can be saved even in the purebasic.prefs)
So you would not have to set the mode each time you create an exe file :wink:
See above quote - but indeed, it might be smart to make the working directory (or storing directory) adjustable. I'll keep that in mind.

Michael
Michael Vogel wrote:PS when using EnableExplicit I get an error that Purefilervar has to be defined?!
Hm, that's an issue. I will work that out.

Thx for the feedback!
Problem solved - a new version is online.
Please verify if the problem is also solved for you.
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Starwolf20 wrote:
Didelphodon wrote: Hm, that's kinda strange - can you post the code with which you tested?
It's only few lines to show the pb



a=0
For i=1 To 100
a=a+1
Next i
Hm, I tried various situations but never was able to get negative results. No idea. Can you execute the following speedtester on your machine and post the result afterwards (the result is also coppied to the clipboard)? Thx.
Go, tell it on the mountains.
Starwolf20
User
User
Posts: 25
Joined: Fri Sep 04, 2009 7:08 pm
Location: Corsica

Re: Purefiler - An alternative profiler

Post by Starwolf20 »

-1030 - -742 = -288

Here you are
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Starwolf20 wrote:-1030 - -742 = -288

Here you are
That's gettn stranger and stranger - plz try the second speedtest. Thx.
Go, tell it on the mountains.
Starwolf20
User
User
Posts: 25
Joined: Fri Sep 04, 2009 7:08 pm
Location: Corsica

Re: Purefiler - An alternative profiler

Post by Starwolf20 »

-1040 - -729 = -311
-0.672840 / -230 / 231210551 / 0
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

I put an Abs() in it as everything looks just inverted on your PC, besides that all the deltas look realistic. So I guess that the sign just flipped because of the actual (high) values on your machine. A new version of Purefiler is online - can you try that?
Go, tell it on the mountains.
Starwolf20
User
User
Posts: 25
Joined: Fri Sep 04, 2009 7:08 pm
Location: Corsica

Re: Purefiler - An alternative profiler

Post by Starwolf20 »

It's ok now

Thanks
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 448
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Starwolf20 wrote:It's ok now

Thanks
Good to hear :P
Go, tell it on the mountains.
Post Reply