Lag test
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Lag test

Started by moo, 14 December, 2007, 14:46:55

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

moo

Can someone please make a script which will test the lag between any user and the hub.
When one user type +lag or +ping it will get a message with his lag time like "You have a 0.5 sec. lag".

rEALx


Already exists a nice script by Mutor - LagCheck 1.0 LUA 5.0/5.1

Quote

   LagCheck 1.0 LUA 5.0/5.1

   By Mutor   01/31/07

   Sends a request to user and times the response time
    -Check yourself or another hub user
    -Provides context menu
   

see thread http://board.ptokax.ath.cx/index.php?topic=6818.0

Hope this is what u need........

rEALx


moo

i want something more simple ...
That one can't be used by anyone .
I don't have such thing as :unregistered users on my hub :P. Everyone have access to it.
And that script test the lag between 2 users ..i think ..
I want that this script to test the lag between the user which type the command (+lag) and the hub.

Thank you .

CrazyGuy

Try this 1

SetTimer(1000)
lagcmd = "+lag"

function Main()
counter = 10
end

function ChatArrival(curUser, data)
		data = string.sub(data, 1, string.len(data)-1) 
		local s,e,cmd,args = string.find(data, "%b<>%s+(%S+)%s*(.*)")
	if cmd == lagcmd then
		if counter == 10 then
			counter = 0
			name = ""
			DoLagTest(curUser)
		else
			SendToNick(curUser.sName, "<?LagTest?> Test busy, please try again in a few seconds.")
		end
	else
		return 0
	end
	return 1
end

function DoLagTest(curUser)
	SendToAll("<?LagTest?> Test started")
	name = curUser.sName
	StartTimer()
end

function OnTimer()
	if counter == 10 then
		StopTimer()
		SendToAll("<?LagTest?> Test finished")
	else
		counter = counter + 1
		SendToAll("<?LagTest?> "..counter)
	end
end

moo

I think with this script i can realize only if i have lag ...but i can't find it's value .
When i type +lag ..all i get is:
<?LagTest?> Test started
<?LagTest?>  1
<?LagTest?>  2
<?LagTest?>  3
<?LagTest?>  4
<?LagTest?>  5
....................
<?LagTest?>  10
<?LagTest?> Test finished


CrazyGuy

If your client shows timestamps, you should have exactly 1 message per 1 second.
If the time between messages fluctuates, there's lag

moo

That mean i can't find the exactly value of the lag ?
Can you please make one script to do that ?

Tx again .

SMF spam blocked by CleanTalk