Skip to content

Commit 3a54e81

Browse files
committed
Made tests terminate
1 parent 4e1a252 commit 3a54e81

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/test/func/cleanup/cleanup.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ void ecall()
77
{
88
snmalloc::ScopedAllocator a;
99
std::vector<void*> allocs;
10-
size_t count = 0;
1110
for (size_t j = 0; j < 1000; j++)
1211
{
1312
allocs.push_back(a.alloc.alloc(j % 1024));
14-
count += j % 1024;
1513
}
1614
auto p = a.alloc.alloc(1 * 1024 * 1024);
1715
memset(p, 0, 1 * 1024 * 1024);
@@ -24,7 +22,7 @@ void ecall()
2422

2523
void thread_body()
2624
{
27-
for (int i = 0; i < 10000; i++)
25+
for (int i = 0; i < 1000; i++)
2826
{
2927
ecall();
3028
std::this_thread::sleep_for(std::chrono::milliseconds(10));
@@ -33,7 +31,7 @@ void thread_body()
3331

3432
void monitor_body()
3533
{
36-
for (int i = 0; i < 10000; i++)
34+
for (int i = 0; i < 60; i++)
3735
{
3836
std::cout << "Current: "
3937
<< snmalloc::Alloc::Config::Backend::get_current_usage()

src/test/perf/churn/churn.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int main()
5959

6060
std::thread([&requests]() {
6161
size_t count = 0;
62-
while (count < 2000)
62+
while (count < 60)
6363
{
6464
count++;
6565
std::this_thread::sleep_for(std::chrono::seconds(1));

0 commit comments

Comments
 (0)