Mercurial > prosody-modules
comparison mod_benchmark_storage/mod_benchmark_storage.lua @ 6385:75838904791e
mod_benchmark_storage: Use util.time instead of prosody.util.time, for 0.12 compatibility
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 01 Feb 2026 14:09:07 +0100 |
| parents | 2468bd4ec025 |
| children |
comparison
equal
deleted
inserted
replaced
| 6384:579d6f4dc2cf | 6385:75838904791e |
|---|---|
| 1 -- mod_benchmark_storage | 1 -- mod_benchmark_storage |
| 2 -- Copyright (C) 2015 Kim Alvefur | 2 -- Copyright (C) 2015 Kim Alvefur |
| 3 -- | 3 -- |
| 4 -- Prime numbers are pretty cool | 4 -- Prime numbers are pretty cool |
| 5 | 5 |
| 6 local gettime = require "prosody.util.time".now; | 6 local gettime = require "util.time".now; |
| 7 | 7 |
| 8 local sm = require"core.storagemanager"; | 8 local sm = require"core.storagemanager"; |
| 9 local um = require"core.usermanager"; | 9 local um = require"core.usermanager"; |
| 10 local mm = require"core.modulemanager"; | 10 local mm = require"core.modulemanager"; |
| 11 | 11 |
| 59 print(("Took %fs with mod_storage_%s"):format(time_taken, test_driver)); | 59 print(("Took %fs with mod_storage_%s"):format(time_taken, test_driver)); |
| 60 end | 60 end |
| 61 | 61 |
| 62 -- 23 usernames | 62 -- 23 usernames |
| 63 test_users = { | 63 test_users = { |
| 64 "tritonymph"; "ankylotomy"; "tron"; "barbaric"; "twiddler"; | 64 "tritonymph"; "ankylotomy"; "tron"; "barbaric"; "twiddler"; |
| 65 "spiritful"; "unmollifiably"; "suggestion"; "presubsistence"; | 65 "spiritful"; "unmollifiably"; "suggestion"; "presubsistence"; |
| 66 "unneeded"; "taxemic"; "teloteropathic"; "nonbending"; "mev"; | 66 "unneeded"; "taxemic"; "teloteropathic"; "nonbending"; "mev"; |
| 67 "septifragally"; "clame"; "obsolescent"; "unconceivable"; | 67 "septifragally"; "clame"; "obsolescent"; "unconceivable"; |
| 68 "foolishly"; "conjunctur"; "precirculation"; "bethump"; "vermivorous"; | 68 "foolishly"; "conjunctur"; "precirculation"; "bethump"; "vermivorous"; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 test_data = { | 71 test_data = { |
| 72 { some_data = "tiny data" }; | 72 { some_data = "tiny data" }; |
