mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Fix benchmarks and adds CI to test them (#12068)
* Fix benchmarks and adds CI to test them Instead of waiting for benchmarks failing in Polkadot CI, we also can just test them in Substrate :P * Do not overflow
This commit is contained in:
@@ -331,7 +331,7 @@ pub struct AllocationStats {
|
||||
/// The sum of every allocation ever made.
|
||||
///
|
||||
/// This increases every time a new allocation is made.
|
||||
pub bytes_allocated_sum: u32,
|
||||
pub bytes_allocated_sum: u128,
|
||||
|
||||
/// The amount of address space (in bytes) used by the allocator.
|
||||
///
|
||||
@@ -435,7 +435,7 @@ impl FreeingBumpHeapAllocator {
|
||||
Header::Occupied(order).write_into(mem, header_ptr)?;
|
||||
|
||||
self.stats.bytes_allocated += order.size() + HEADER_SIZE;
|
||||
self.stats.bytes_allocated_sum += order.size() + HEADER_SIZE;
|
||||
self.stats.bytes_allocated_sum += u128::from(order.size() + HEADER_SIZE);
|
||||
self.stats.bytes_allocated_peak =
|
||||
std::cmp::max(self.stats.bytes_allocated_peak, self.stats.bytes_allocated);
|
||||
self.stats.address_space_used = self.bumper - self.original_heap_base;
|
||||
|
||||
Reference in New Issue
Block a user