-
Notifications
You must be signed in to change notification settings - Fork 2k
P2 update F2025 #844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
P2 update F2025 #844
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0efb85f
Update public interfaces for P2 2025 update
quantumish 61fdc45
Add P2 update untracked files
quantumish f4c2344
Run format on P2 update
quantumish cb99b2c
Sync p2 interface updates
quantumish 3c062ef
Sync updates to P2 tests
quantumish e49f79d
Run format
quantumish 806a744
Bump thread count in B+tree bench
quantumish c156254
Add new tombstone test case
quantumish 7bd2f68
Add printing utilities for tombstones
quantumish c5c812a
Run format
quantumish 3b7c8fd
Fix SVG printing of tombstones
quantumish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #pragma once | ||
|
|
||
| #include <atomic> | ||
| #include "./buffer_pool_manager.h" | ||
|
|
||
| namespace bustub { | ||
|
|
||
| class TracedBufferPoolManager { | ||
| private: | ||
| std::atomic<size_t> reads_ = 0; | ||
| std::atomic<size_t> writes_ = 0; | ||
| BufferPoolManager *bpm_; | ||
|
|
||
| public: | ||
| explicit TracedBufferPoolManager(BufferPoolManager *bpm) : bpm_{bpm} {} | ||
|
|
||
| auto WritePage(page_id_t page_id, AccessType access_type = AccessType::Unknown) -> WritePageGuard { | ||
| writes_++; | ||
| return bpm_->WritePage(page_id, access_type); | ||
| } | ||
|
|
||
| auto ReadPage(page_id_t page_id, AccessType access_type = AccessType::Unknown) -> ReadPageGuard { | ||
| reads_++; | ||
| return bpm_->ReadPage(page_id, access_type); | ||
| } | ||
|
|
||
| auto NewPage() -> page_id_t { return bpm_->NewPage(); } | ||
| auto DeletePage(page_id_t page) -> bool { return bpm_->DeletePage(page); } | ||
|
|
||
| auto GetReads() -> size_t { return reads_; } | ||
| auto GetWrites() -> size_t { return writes_; } | ||
| }; | ||
|
|
||
| }; // namespace bustub | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.