mirror of
https://github.com/google/benchmark.git
synced 2025-01-29 21:30:18 +08:00
Removed deprecated function (#1506)
* Removed deprecated function * updated tests too * restore comment Co-authored-by: dominic hamon <dominichamon@users.noreply.github.com>
This commit is contained in:
parent
d572f47773
commit
9714eb8d11
@ -383,13 +383,7 @@ class MemoryManager {
|
||||
virtual void Start() = 0;
|
||||
|
||||
// Implement this to stop recording and fill out the given Result structure.
|
||||
BENCHMARK_DEPRECATED_MSG("Use Stop(Result&) instead")
|
||||
virtual void Stop(Result* result) = 0;
|
||||
|
||||
// FIXME(vyng): Make this pure virtual once we've migrated current users.
|
||||
BENCHMARK_DISABLE_DEPRECATED_WARNING
|
||||
virtual void Stop(Result& result) { Stop(&result); }
|
||||
BENCHMARK_RESTORE_DEPRECATED_WARNING
|
||||
virtual void Stop(Result& result) = 0;
|
||||
};
|
||||
|
||||
// Register a MemoryManager instance that will be used to collect and report
|
||||
|
@ -387,10 +387,7 @@ void BenchmarkRunner::DoOneRepetition() {
|
||||
manager->WaitForAllThreads();
|
||||
manager.reset();
|
||||
b.Teardown();
|
||||
|
||||
BENCHMARK_DISABLE_DEPRECATED_WARNING
|
||||
memory_manager->Stop(memory_result);
|
||||
BENCHMARK_RESTORE_DEPRECATED_WARNING
|
||||
memory_manager->Stop(*memory_result);
|
||||
}
|
||||
|
||||
// Ok, now actually report.
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
class TestMemoryManager : public benchmark::MemoryManager {
|
||||
void Start() BENCHMARK_OVERRIDE {}
|
||||
void Stop(Result* result) BENCHMARK_OVERRIDE {
|
||||
result->num_allocs = 42;
|
||||
result->max_bytes_used = 42000;
|
||||
void Stop(Result& result) BENCHMARK_OVERRIDE {
|
||||
result.num_allocs = 42;
|
||||
result.max_bytes_used = 42000;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user