… | |
… | |
79 | our $CLEAN_RANDOM_MAPS = cf::periodic 3600, Coro::unblock_sub { |
79 | our $CLEAN_RANDOM_MAPS = cf::periodic 3600, Coro::unblock_sub { |
80 | clean_random_maps; |
80 | clean_random_maps; |
81 | }; |
81 | }; |
82 | |
82 | |
83 | # map generator stresstest, NEVER enable under normal circumstances |
83 | # map generator stresstest, NEVER enable under normal circumstances |
84 | if (1) { |
84 | if (0) { |
85 | cf::async { |
85 | cf::async { |
86 | my $seed = 0; |
86 | my $seed = 0; |
87 | while () { |
87 | while () { |
88 | my $map = cf::map::new; |
88 | my $map = cf::map::new; |
89 | $map->generate_random_map ({ |
89 | $map->generate_random_map ({ |
… | |
… | |
96 | $map->destroy; |
96 | $map->destroy; |
97 | } |
97 | } |
98 | }; |
98 | }; |
99 | } |
99 | } |
100 | |
100 | |
|
|
101 | # prefetch test, load some ocean-maps |
|
|
102 | if (0) { |
|
|
103 | cf::async { |
|
|
104 | # 0.58 |
|
|
105 | Coro::Timer::sleep 2; |
|
|
106 | for my $x (200..219) { |
|
|
107 | for my $y (200..219) { |
|
|
108 | (cf::map::find "/world/world_$x\_$y")->load; |
|
|
109 | } |
|
|
110 | } |
|
|
111 | }; |
|
|
112 | } |
|
|
113 | |
101 | 1 |
114 | 1 |
102 | |
115 | |