mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
style
This commit is contained in:
parent
0d8ff26706
commit
4c02ddcf3b
@ -31,21 +31,21 @@ TEST(SchedulerCustomResourceManager, Smoke)
|
|||||||
</clickhouse>
|
</clickhouse>
|
||||||
)CONFIG");
|
)CONFIG");
|
||||||
|
|
||||||
ClassifierPtr cA = t.manager->acquire("A");
|
ClassifierPtr c_a = t.manager->acquire("A");
|
||||||
ClassifierPtr cB = t.manager->acquire("B");
|
ClassifierPtr c_b = t.manager->acquire("B");
|
||||||
|
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
ResourceGuard gA(ResourceGuard::Metrics::getIOWrite(), cA->get("res1"), 1, ResourceGuard::Lock::Defer);
|
ResourceGuard g_a(ResourceGuard::Metrics::getIOWrite(), c_a->get("res1"), 1, ResourceGuard::Lock::Defer);
|
||||||
gA.lock();
|
g_a.lock();
|
||||||
gA.consume(1);
|
g_a.consume(1);
|
||||||
gA.unlock();
|
g_a.unlock();
|
||||||
|
|
||||||
ResourceGuard gB(ResourceGuard::Metrics::getIOWrite(), cB->get("res1"));
|
ResourceGuard g_b(ResourceGuard::Metrics::getIOWrite(), c_b->get("res1"));
|
||||||
gB.unlock();
|
g_b.unlock();
|
||||||
|
|
||||||
ResourceGuard gC(ResourceGuard::Metrics::getIORead(), cB->get("res1"));
|
ResourceGuard g_c(ResourceGuard::Metrics::getIORead(), c_b->get("res1"));
|
||||||
gB.consume(2);
|
g_b.consume(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user