rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: vbn on May 19, 2010, 04:24:07 AM

Title: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on May 19, 2010, 04:24:07 AM
I have a serious accounting issue :)

If a file is being download by a download manager/accelerator in multi-threaded mode, each thread adds to the 'Hits' stat...isnt there a way to properly increment this as 1 irrespective of the parts being downloaded !
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: maverick on May 19, 2010, 11:03:29 PM
If a file is being download by a download manager/accelerator in multi-threaded mode, each thread adds to the 'Hits' stat...isnt there a way to properly increment this as 1 irrespective of the parts being downloaded !

Don't think so as every new part being downloaded is a new download connection to the server.  If you are allowing the use of download managers you might have to live with things like this.
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on May 20, 2010, 06:55:59 AM
Correct ... thats what 'Hits' is supposed to mean also...

but isnt there a way of counting 'Downloads' also.... a whole file should count as 1 irrespective of the parts being split into. 

Any MODs someone has already done would like to share....really in need of this  ;D
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on June 11, 2010, 03:58:44 PM
sorry for the late reply.
what version are you using?
in hfs 2.3 downloads are supposed to be counted just as full downloads.
if you mean "total hits", you will also find "total downloads".
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 05, 2010, 05:52:53 AM
Sorry was out of country.... I am running latest Beta

...so we have 2 seperate counters now - Hits & Downloads ?

What keywords are used for both ?
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: Mars on July 05, 2010, 09:46:37 AM
you can have a look to the wiki at TEMPLATE SYMBOL part

http://www.rejetto.com/wiki/index.php?title=HFS:_Template_symbols

 ;)
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 06, 2010, 11:28:21 AM
please specify WHERE are you looking,
there are many numbers over the program
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: Mars on July 06, 2010, 01:05:04 PM
Quote from: VBN
Sorry was out of country.... I am running latest Beta

...so we have 2 seperate counters now - Hits & Downloads ?

What keywords are used for both ?

Quote from: Rejetto
please specify WHERE are you looking,
there are many numbers over the program

files+folders  hits -->>  %item-dl-count%

downloads          -->> %total-downloads%
......
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 07, 2010, 05:18:30 AM
OK....%total-downloads% seems to be the total number of downloads by HFS altogether ... not related to a particular file in any way

which brings back to original question :

%item-dl-count% : Number of hits for a file which means 3 threads of download using an accelerator get counted as 3 and not 1
??? : Counts unique download requests irrespective of number of threads from client side

This is my dilemma...not sure if this is already builtin or if can be ?
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: Mars on July 07, 2010, 09:45:10 AM
to have the real total number of downloads, you must stop download accelerator (check limits -->> Prevent leeching)

 ;)

Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 08, 2010, 04:52:35 AM
Ouch...that defeats the purpose for which I am using HFS ... its a File Server and runs continously with a bandwidth of around 60-100 Mbps downloads.

Anyways... maybe something can be incoporated in later builds...just a request :)
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 08, 2010, 02:45:35 PM
why are you saying that?
for what i can see, the item-dl-count is counting only full downloads.
am i wrong?
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: Mars on July 09, 2010, 01:57:34 PM
please boss and others, when you ask someone, can you use @mars ....  @userX to specify which interlocutor? ;)
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 12, 2010, 09:37:16 AM
you, mars
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: Mars on July 12, 2010, 09:17:21 PM
@rejetto
"for what i can see, the item-dl-count is counting only full downloads."

you are right  ;) one point to you :D
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 12, 2010, 11:50:33 PM
ok, vbn, it already works as you need it
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 13, 2010, 05:33:46 AM
@rejetto :
 ??? I dont think so ... HFS is counting each thread of download as 1 instead of whole file which means if a user downloads a file using accelerator like Flashget using split into 3 threads... the item-dl-count increments by 3 and NOT 1.

You can test yourself @ http://www.vbnfiles.com/xda/vbn ... try any file above 1 MB

That is what my question and dilemma is...
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 13, 2010, 10:37:18 AM
ok, i will install an accelerator and test myself. I have none at this moment.
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 14, 2010, 03:09:30 AM
Appreciate it...Thanks
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 27, 2010, 08:31:47 AM
@rejetto : Any word on this :)
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 27, 2010, 02:16:05 PM
i just used FDM to download a 6MB file using 4 threads, on my local hfs.
the counter raised just by 1, correctly.

then i used FDM to download a 1MB file from you, it used 2 threads.
the counter again raised just by 1.
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: vbn on July 31, 2010, 08:41:47 AM
Hmm..maybe its the latest beta  ??? because its fine now ...

Anyways I am happy its working as desired  ;D
Title: Re: URGENT : Hits counter not valid for multi-threaded
Post by: rejetto on July 31, 2010, 10:58:15 AM
i don't think it's related to the beta, since i firstly replied you reading the code of the previous build.