Skip to content
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

Switch to gtest #7

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9963a01
switch to gtest, don't update all tests
thetazero Nov 28, 2023
d22b7ee
test benchmark stack
thetazero Nov 29, 2023
a787027
make half the tests work
thetazero Nov 29, 2023
e4f2890
trailing newlines
thetazero Nov 29, 2023
37bb208
Another attempt at reproducing the bug
thetazero Dec 6, 2023
fb7cf75
reproducing bug
thetazero Dec 6, 2023
b510b37
test bug comments
thetazero Jan 18, 2024
e169733
clone sticky counter
thetazero Jan 18, 2024
51d9186
working experiments refactor
thetazero Jan 18, 2024
e6876f4
autopep8
thetazero Jan 18, 2024
a24ad49
final cleanup
thetazero Jan 21, 2024
8b3e02f
better help
thetazero Jan 21, 2024
aef1e87
minor touch ups
thetazero Jan 23, 2024
aebdaa9
Merge pull request #2 from thetazero/benchmarks
thetazero Jan 23, 2024
387968c
Merge branch 'use_gtest' into sticky_counter_experiment
thetazero Jan 23, 2024
6a24bac
break out increment and decrement functions
thetazero Jan 23, 2024
1d6b5e1
switch to external helper functions
thetazero Jan 23, 2024
21f3b93
stick counter pair type
thetazero Jan 25, 2024
9ef7aac
basic alternate graphing
thetazero Jan 25, 2024
a096a41
working refactored benchmark
thetazero Jan 27, 2024
32041a6
minor consistency improvements
thetazero Jan 27, 2024
22c2749
Merge pull request #4 from thetazero/better_plots
thetazero Jan 29, 2024
a5890b6
basic alternate graphing
thetazero Jan 25, 2024
a804e18
working refactored benchmark
thetazero Jan 27, 2024
a0a7a3f
minor consistency improvements
thetazero Jan 27, 2024
fea05d2
add test_sticky_counter
thetazero Feb 7, 2024
e97a5e3
refactor utils
thetazero Feb 7, 2024
cfa7a6f
line endings
thetazero Jan 29, 2024
2625416
testing instrumentation
thetazero Feb 1, 2024
c83fc74
testweak
thetazero Feb 4, 2024
a0bc0db
remove now uncessesary shell scripts
thetazero Feb 4, 2024
4424ce3
testing updates
thetazero Feb 7, 2024
f9a380c
Merge pull request #5 from thetazero/sticky_counter_bugfix_instrument…
thetazero Feb 7, 2024
5e93663
leaky weak ptr test
thetazero Feb 9, 2024
93c5256
add assertions for counts on everything
thetazero Feb 11, 2024
7e6ac00
add more assertions
thetazero Feb 12, 2024
9a6f0b7
weird scoping to be able to insert extra assertions
thetazero Feb 12, 2024
e46da38
add assertiosn after destructors
thetazero Feb 12, 2024
90c01bd
Make weak counter substract one from raw weak count when returning we…
thetazero Feb 18, 2024
b70f0fc
Merge pull request #7 from thetazero/fix_weak_count
thetazero Feb 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
BasedOnStyle: Google
AccessModifierOffset: '-1'
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: 'true'
AlignConsecutiveAssignments: 'false'
AlignConsecutiveDeclarations: 'false'
AlignEscapedNewlines: Right
AlignOperands: 'true'
AlignTrailingComments: 'true'
AllowAllArgumentsOnNextLine: 'true'
AllowAllConstructorInitializersOnNextLine: 'true'
AllowShortBlocksOnASingleLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: 'false'
AlwaysBreakTemplateDeclarations: 'Yes'
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: 'true'
ColumnLimit: '120'
CompactNamespaces: 'false'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
Cpp11BracedListStyle: 'true'
FixNamespaceComments: 'true'
IncludeBlocks: Preserve
IndentCaseLabels: 'true'
IndentPPDirectives: None
IndentWidth: '2'
IndentWrappedFunctionNames: 'false'
KeepEmptyLinesAtTheStartOfBlocks: 'true'
Language: Cpp
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: None
PointerAlignment: Left
SortIncludes: 'false'
SpaceAfterCStyleCast: 'false'
SpaceAfterLogicalNot: 'false'
SpaceAfterTemplateKeyword: 'false'
SpaceBeforeAssignmentOperators: 'true'
SpaceBeforeCpp11BracedList: 'false'
SpaceBeforeCtorInitializerColon: 'true'
SpaceBeforeInheritanceColon: 'true'
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'true'
SpaceInEmptyParentheses: 'false'
SpacesInAngles: 'false'
SpacesInCStyleCastParentheses: 'false'
SpacesInContainerLiterals: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
Standard: Auto
TabWidth: '2'
UseTab: Never

...
24 changes: 24 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Settings for clang-tidy
#
# Supports the following options:
#
# Checks: '-*,some-check'
# WarningsAsErrors: ''
# HeaderFilterRegex: ''
# FormatStyle: none
# User: user
# CheckOptions:
# - key: some-check.SomeOption
# value: 'some value'

Checks: 'bugprone-*,
-bugprone-easily-swappable-parameters,
clang-analyzer-*,
performance-*,
portability-*'
WarningsAsErrors: 'bugprone-*,
-bugprone-easily-swappable-parameters,
clang-analyzer-*,
performance-*,
portability-*'
FormatStyle: none
8 changes: 8 additions & 0 deletions .cppcheck-suppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Settings for cppcheck
//
// Suppresses errors that match the format:
//
// [error id]:[filename]:[line]
//
// The [filename] and [line] are optional. If [error id]
// is a wildcard '*', all error ids match.
3 changes: 3 additions & 0 deletions .sanitizer-blacklist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Sanitizer blacklist file
# Ignore functions with fun:x
# Ignore files with src:x
Empty file added .valgrind-suppress
Empty file.
16 changes: 16 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
19 changes: 19 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(ctest) Launch",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"cwd": "${cmake.testWorkingDirectory}",
"program": "${cmake.testProgram}",
"args": [
"${cmake.testArgs}"
],
}
]
}
79 changes: 79 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"files.associations": {
"semaphore": "cpp",
"stop_token": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"span": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeinfo": "cpp",
"variant": "cpp",
"strstream": "cpp",
"bitset": "cpp",
"cinttypes": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"regex": "cpp",
"cfenv": "cpp",
"typeindex": "cpp"
},
"cmake.configureSettings": { "gtest_build_samples": "ON" }
}
Loading