Skip to content

Commit

Permalink
fixup! fixup! Add a progress bar indicator for record processing
Browse files Browse the repository at this point in the history
Stop tracking num processed allocations in RecordReader

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
  • Loading branch information
godlygeek committed May 19, 2022
1 parent 78109e7 commit 669bde5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/memray/_memray/record_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ RecordReader::nextRecord()
if (d_input->is_open()) LOG(ERROR) << "Failed to process allocation record";
return RecordResult::ERROR;
}
d_processed_allocations += 1;
return RecordResult::ALLOCATION_RECORD;
} break;
case RecordType::ALLOCATION_WITH_NATIVE: {
Expand All @@ -453,7 +452,6 @@ RecordReader::nextRecord()
}
return RecordResult::ERROR;
}
d_processed_allocations += 1;
return RecordResult::ALLOCATION_RECORD;
} break;
case RecordType::MEMORY_RECORD: {
Expand Down Expand Up @@ -637,12 +635,6 @@ RecordReader::getLatestMemoryRecord() const noexcept
return d_latest_memory_record;
}

size_t
RecordReader::getProcessedAllocations() const noexcept
{
return d_processed_allocations;
}

PyObject*
RecordReader::dumpAllRecords()
{
Expand Down
3 changes: 0 additions & 3 deletions src/memray/_memray/record_reader.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#pragma once

#include <assert.h>
#include <atomic>
#include <fstream>
#include <functional>
#include <limits>
Expand Down Expand Up @@ -51,7 +50,6 @@ class RecordReader
std::string getThreadName(thread_id_t tid);
Allocation getLatestAllocation() const noexcept;
MemoryRecord getLatestMemoryRecord() const noexcept;
size_t getProcessedAllocations() const noexcept;

private:
// Aliases
Expand Down Expand Up @@ -85,7 +83,6 @@ class RecordReader
std::unordered_map<thread_id_t, std::string> d_thread_names;
Allocation d_latest_allocation;
MemoryRecord d_latest_memory_record;
std::atomic<size_t> d_processed_allocations{0};

// Methods
[[nodiscard]] bool parseFramePush(FramePush* record);
Expand Down
1 change: 0 additions & 1 deletion src/memray/_memray/record_reader.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ cdef extern from "record_reader.h" namespace "memray::api":
string getThreadName(long int tid) except+
Allocation getLatestAllocation()
MemoryRecord getLatestMemoryRecord()
size_t getProcessedAllocations()

0 comments on commit 669bde5

Please sign in to comment.