Skip to content

Commit 1c25a7a

Browse files
Zainullin DamirZainullin Damir
authored andcommitted
++
1 parent 33ce7d8 commit 1c25a7a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

include/ipfixprobe/outputPlugin/outputStorage/outputStorage.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ constexpr std::size_t remap(const std::size_t index) noexcept
2424
/*if (index > std::numeric_limits<uint16_t>::max()) {
2525
throw std::runtime_error("ZZZz");
2626
}*/
27-
// return index;
28-
return index * 27644437;
29-
// return ~index;
30-
// return std::byteswap(static_cast<uint16_t>(index));
27+
return index;
28+
// return index * 27644437;
29+
// return ~index;
30+
// return std::byteswap(static_cast<uint16_t>(index));
3131
}
3232

3333
template<typename ElementType>

include/ipfixprobe/outputPlugin/outputStorage/outputStorageRegistrar.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class OutputStorageRegistrar {
2626
m_storages = std::make_shared<std::shared_ptr<OutputStorage<ElementType>>[]>(
2727
OutputStorage<ElementType>::MAX_READER_GROUPS_COUNT);
2828
m_allocationBuffer
29-
= std::make_shared<AllocationBufferR<ReferenceCounter<OutputContainer<ElementType>>>>(
29+
= std::make_shared<AllocationBuffer3<ReferenceCounter<OutputContainer<ElementType>>>>(
3030
OutputStorage<ElementType>::STORAGE_CAPACITY
3131
* OutputStorage<ElementType>::MAX_READER_GROUPS_COUNT,
3232
writersCount);

include/ipfixprobe/outputPlugin/outputStorage/spinlock.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Spinlock {
1717
{
1818
BackoffScheme backoffScheme(20, std::numeric_limits<std::size_t>::max());
1919
while (true) {
20-
while (flag.test(std::memory_order_relaxed)) {
20+
while (flag.test(std::memory_order_acquire)) {
2121
backoffScheme.backoff();
2222
}
2323
if (!flag.test_and_set(std::memory_order_acquire)) {

tests/performance/outputStorage/testOutputStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ TEST(TestOutputStorage, Debug)
294294
{
295295
for (const auto testIndex : std::views::iota(0, 100)) {
296296
std::cout << " Debug Loop Iteration " << testIndex << "\n";
297-
makeTest<ipxp::output::FFQ2OutputStorage<void*>>(32, {8, 8, 8, 8}, false, 2'000'000);
297+
makeTest<ipxp::output::BOutputStorage<void*>>(32, {32}, false, 10'000'000);
298298
}
299299
}
300300

0 commit comments

Comments
 (0)