If you want to record your own timedemo, load up a particularly challenging stretch of the game, then open the console and type "recorddemo demoname" (without quotes). E.g: recorddemo trialrun will start recording a demo called trailrun.demo in your \Quake 4\q4base\demos\ directory. Type "stoprecording" (without quotes) to stop recording this demo at any time.
Now, to run your custom demo (or any custom demo), go to your in-game console (See Advanced Tweaking section for details) and type "timedemo demoname" in the console. Wait for the run to finish and note the results, then you can compare them with others online. If you want to run the timedemo in a loop (as a stress test for example), see these instructions.