Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Ramstream speed test
Feedback.

Function:
You find this example project in your Plugins Download as a Xojo (Real Studio) project file within the examples folder: /Util/Ramstream speed test
This example is the version from Sun, 17th Mar 2012.
Notes: Last modified: Sun, 17th Mar 2012
Project "Ramstream speed test.rbp"
Class Window1 Inherits Window
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End ControlInstance
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
End ControlInstance
Sub Action() dim i as integer dim d as string dim s as string dim m as memoryBlock dim t as integer const count1=1000 const count2=10000 m=newmemoryBlock(1000) s=m.stringValue(0,1000) // get a 1000 Byte long string 'SetEncodingOfStringMBS s,0 // Just in case RB doesn't set it. s=DefineEncoding(s,Encodings.ASCII) t=ticks for i=1 to count1 d=d+s next t=ticks-t staticText3.text=format(t,"0") if CheckBox1.Value then d="" t=ticks for i=1 to count2 d=d+s next t=ticks-t staticText11.text=format(t,"0") else staticText11.text="" end if End
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
End ControlInstance
Sub Action() dim r as RamStreamMBS dim i as integer dim s as string dim d as string dim m as memoryBlock dim t as integer const count1=1000 const count2=10000 m=newmemoryBlock(1000) s=m.stringValue(0,1000) // get a 1000 Byte long string t=ticks r=CreateRamStreamMBS(1000*count1) for i=1 to count1 r.write s next r.position=0 d=r.read(r.length) t=ticks-t staticText4.text=format(t,"0") t=ticks r=CreateRamStreamMBS(1000*count2) for i=1 to count2 r.write s next r.position=0 d=r.read(r.length) t=ticks-t staticText12.text=format(t,"0") End
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End ControlInstance
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End ControlInstance
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End ControlInstance
End Control
Control StaticText5 Inherits Label
ControlInstance StaticText5 Inherits Label
End ControlInstance
End Control
Control StaticText6 Inherits Label
ControlInstance StaticText6 Inherits Label
End ControlInstance
End Control
Control StaticText7 Inherits Label
ControlInstance StaticText7 Inherits Label
End ControlInstance
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
End ControlInstance
Sub Action() dim r as StringHandleMBS dim i as integer dim s as string dim d as string dim m as memoryBlock dim t as integer const count1=1000 const count2=10000 m=newmemoryBlock(1000) s=m.stringValue(0,1000) // get a 1000 Byte long string t=ticks r=new StringHandleMBS for i=1 to count1 r.Add s next d=r.copy t=ticks-t staticText6.text=format(t,"0") t=ticks r=new StringHandleMBS for i=1 to count2 r.Add s next d=r.copy t=ticks-t staticText13.text=format(t,"0") End
End Control
Control StaticText8 Inherits Label
ControlInstance StaticText8 Inherits Label
End ControlInstance
End Control
Control StaticText9 Inherits Label
ControlInstance StaticText9 Inherits Label
End ControlInstance
End Control
Control StaticText11 Inherits Label
ControlInstance StaticText11 Inherits Label
End ControlInstance
End Control
Control StaticText12 Inherits Label
ControlInstance StaticText12 Inherits Label
End ControlInstance
End Control
Control StaticText13 Inherits Label
ControlInstance StaticText13 Inherits Label
End ControlInstance
End Control
Control StaticText10 Inherits Label
ControlInstance StaticText10 Inherits Label
End ControlInstance
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
End ControlInstance
End Control
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project

The items on this page are in the following plugins: MBS Util Plugin.




Links
Christians Software aus Nickenich