Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22bd64d
Unit Tests Visor Core: cover StreamHandler Class (#682)
leoparente Jun 22, 2023
2c8c1ee
Upgrade datasketches lib from 3.3.0 to 4.1.0 (#684)
leoparente Jun 26, 2023
e164c05
upgrade PcapPlusPlus dependency from v22.05 to v22.11 (#663)
leoparente Jun 26, 2023
2e69c34
Increase policies unit tests and code coverage (#685)
leoparente Jul 22, 2023
0a280c1
Update Dockerfile to use bullseye image (#686)
etaques Aug 1, 2023
a2bfaab
Update current dependencies to latest (#687)
leoparente Sep 18, 2023
c3a3a08
[ENG-786] - fix: pktvisor-cli for arm64 architecture (#688)
etaques Sep 21, 2023
09d427c
Simplify and fix TCP netprobe probe (#690)
weyrick Oct 7, 2023
20403fb
migrate from catch2v2 to catch2v3 and implement VisorTest helper lib …
leoparente Oct 7, 2023
5e15f15
Revert "migrate from catch2v2 to catch2v3 and implement VisorTest hel…
weyrick Oct 7, 2023
c9a0ab3
Migrate from catch2v2 to catch2v3 (#692)
leoparente Oct 16, 2023
d4f43a2
Update conan CI version to 1.61.0 and re-enable macos build (#693)
leoparente Oct 17, 2023
167a0b1
Upgrade uvw to 3.X and fix/suppress some compiler warnings (#694)
leoparente Oct 17, 2023
ab14a07
Upgrade pcapplusplus from 22.11 to 23.09 (#701)
leoparente Nov 7, 2023
28a389b
OTLP: Move policy name to attributes (#699)
leoparente Nov 11, 2023
3a93036
bump version to 4.5.0 (#702)
mfiedorowicz Dec 26, 2023
c5f3c96
Bump certifi from 2022.6.15 to 2023.7.22 in /automated_tests (#703)
dependabot[bot] Dec 26, 2023
64654f6
Bump requests from 2.28.1 to 2.31.0 in /automated_tests (#705)
dependabot[bot] Dec 26, 2023
b0e213b
Update dependency libraries (#704)
leoparente Dec 26, 2023
25306cc
Bump urllib3 from 1.26.11 to 1.26.18 in /automated_tests (#706)
dependabot[bot] Dec 27, 2023
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
2 changes: 1 addition & 1 deletion .github/actions/build-cpp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /pktvisor-src
RUN apt-get update && \
apt-get upgrade --yes --force-yes && \
apt-get install --yes --force-yes --no-install-recommends ${BUILD_DEPS} && \
pip3 install 'conan==1.59.0' --force-reinstall
pip3 install 'conan==1.61.0' --force-reinstall

RUN chmod +x /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/build-go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:latest
FROM golang:bullseye

LABEL author="Everton Haise Taques <[email protected]>"
LABEL maintainer="netboxlabs"
Expand Down
87 changes: 45 additions & 42 deletions .github/workflows/build-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,56 +24,58 @@ jobs:
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

runs-on: macos-11
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install gcc 12.2
run: |
gcc --version
brew search gcc
brew install gcc@12
gcc --version


- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build

- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Get Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

# - name: Setup Conan Cache
# uses: actions/cache@v3
# with:
# path: ${{github.workspace}}/build/conan_home/
# key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt', '*/conanfile.txt') }}
# restore-keys: conan-${{ runner.os }}-

# - name: Configure CMake
# # Use a bash shell so we can use the same syntax for environment variable
# # access regardless of the host operating system
# shell: bash
# working-directory: ${{github.workspace}}/build
# # Note the current convention is to use the -S and -B options here to specify source
# # and build directories, but this is only available with CMake 3.13 and higher.
# # The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

# - name: Build
# working-directory: ${{github.workspace}}/build
# shell: bash
# # Execute the build. You can specify a specific target with "--target <NAME>"
# run: cmake --build . --config $BUILD_TYPE -- -j 2

# - name: Test
# working-directory: ${{github.workspace}}/build
# shell: bash
# # Execute tests defined by the CMake configuration.
# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C $BUILD_TYPE
version: 1.61.0

- name: Setup OSX Environment
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV

- name: Setup Conan Cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/build/conan_home/
key: conan-${{ runner.os }}-${{ hashFiles('conanfile.txt', '*/conanfile.txt') }}
restore-keys: conan-${{ runner.os }}-

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: PKG_CONFIG_PATH=${{github.workspace}}/local/lib/pkgconfig cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE -- -j 2

- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE

unit-tests-linux:
# The CMake configure and build commands are platform agnostic and should work equally
Expand All @@ -99,7 +101,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: linux package install
run: |
Expand Down Expand Up @@ -166,7 +168,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Remove libpcap from conanfile
shell: bash
Expand Down Expand Up @@ -396,7 +398,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -848,6 +850,7 @@ jobs:
with:
context: "."
file: "./Dockerfile"
goarch: "arm64"

- name: Debug artifacts
run: ls -lha .
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Setup Conan Cache
uses: actions/cache@v3
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Configure CMake to generate VERSION
shell: bash
Expand Down Expand Up @@ -279,7 +279,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Remove libpcap from conanfile
shell: bash
Expand Down Expand Up @@ -423,6 +423,7 @@ jobs:
uses: ./.github/actions/build-go
with:
context: "."
goarch: arm64
file: "./Dockerfile"

- name: Debug artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_cross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
curl -L "${{matrix.toolchain}}" | tar -C toolchain -xz --strip-components=1

- name: Install Conan
run: pip install --no-cache-dir 'conan==1.59.0' --force-reinstall
run: pip install --no-cache-dir 'conan==1.61.0' --force-reinstall

- name: Create Conan configuration
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0
version: 1.61.0

- name: Setup Conan Cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-ql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- run: |
# Run Build - set up dependencies, env vars, compile, and make test
#install conan
pip install --no-cache-dir 'conan==1.59.0' --force-reinstall
pip install --no-cache-dir 'conan==1.61.0' --force-reinstall
# create conan config
CONAN_V2_MODE=1 conan config init
conan config set general.revisions_enabled=1
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ docs/internals/html
appimage/*.AppImage
/test-config*.yaml
localconfig/
.cache/
.vscode/
build/
7 changes: 6 additions & 1 deletion 3rd/datasketches/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ target_sources(common
${CMAKE_CURRENT_SOURCE_DIR}/include/conditional_back_inserter.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/conditional_forward.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/ceiling_power_of_2.hpp
)
${CMAKE_CURRENT_SOURCE_DIR}/include/kolmogorov_smirnov.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/kolmogorov_smirnov_impl.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/quantiles_sorted_view.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/quantiles_sorted_view_impl.hpp
${CMAKE_CURRENT_SOURCE_DIR}/include/version.hpp.in
)
52 changes: 25 additions & 27 deletions 3rd/datasketches/common/include/MurmurHash3.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,30 @@ typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;

#define FORCE_INLINE __forceinline
#define MURMUR3_FORCE_INLINE __forceinline

#include <stdlib.h>

#define ROTL32(x,y) _rotl(x,y)
#define ROTL64(x,y) _rotl64(x,y)
#define MURMUR3_ROTL64(x,y) _rotl64(x,y)

#define BIG_CONSTANT(x) (x)
#define MURMUR3_BIG_CONSTANT(x) (x)

// Other compilers

#else // defined(_MSC_VER)

#include <stdint.h>

#define FORCE_INLINE inline __attribute__((always_inline))

inline uint32_t rotl32 ( uint32_t x, int8_t r )
{
return (x << r) | (x >> (32 - r));
}
#define MURMUR3_FORCE_INLINE inline __attribute__((always_inline))

inline uint64_t rotl64 ( uint64_t x, int8_t r )
{
return (x << r) | (x >> (64 - r));
}

#define ROTL32(x,y) rotl32(x,y)
#define ROTL64(x,y) rotl64(x,y)
#define MURMUR3_ROTL64(x,y) rotl64(x,y)

#define BIG_CONSTANT(x) (x##LLU)
#define MURMUR3_BIG_CONSTANT(x) (x##LLU)

#endif // !defined(_MSC_VER)

Expand All @@ -78,7 +71,7 @@ typedef struct {
// Block read - if your platform needs to do endian-swapping or can only
// handle aligned reads, do the conversion here

FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
MURMUR3_FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
{
uint64_t res;
memcpy(&res, p + i, sizeof(res));
Expand All @@ -88,20 +81,21 @@ FORCE_INLINE uint64_t getblock64 ( const uint64_t * p, size_t i )
//-----------------------------------------------------------------------------
// Finalization mix - force all bits of a hash block to avalanche

FORCE_INLINE uint64_t fmix64 ( uint64_t k )
MURMUR3_FORCE_INLINE uint64_t fmix64 ( uint64_t k )
{
k ^= k >> 33;
k *= BIG_CONSTANT(0xff51afd7ed558ccd);
k *= MURMUR3_BIG_CONSTANT(0xff51afd7ed558ccd);
k ^= k >> 33;
k *= BIG_CONSTANT(0xc4ceb9fe1a85ec53);
k *= MURMUR3_BIG_CONSTANT(0xc4ceb9fe1a85ec53);
k ^= k >> 33;

return k;
}

FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t seed, HashState& out) {
static const uint64_t c1 = BIG_CONSTANT(0x87c37b91114253d5);
static const uint64_t c2 = BIG_CONSTANT(0x4cf5ad432745937f);
MURMUR3_FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes,
uint64_t seed, HashState& out) {
static const uint64_t c1 = MURMUR3_BIG_CONSTANT(0x87c37b91114253d5);
static const uint64_t c2 = MURMUR3_BIG_CONSTANT(0x4cf5ad432745937f);

const uint8_t* data = (const uint8_t*)key;

Expand All @@ -118,13 +112,13 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
uint64_t k1 = getblock64(blocks, i * 2 + 0);
uint64_t k2 = getblock64(blocks, i * 2 + 1);

k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
out.h1 = ROTL64(out.h1,27);
k1 *= c1; k1 = MURMUR3_ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
out.h1 = MURMUR3_ROTL64(out.h1,27);
out.h1 += out.h2;
out.h1 = out.h1*5+0x52dce729;

k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
out.h2 = ROTL64(out.h2,31);
k2 *= c2; k2 = MURMUR3_ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
out.h2 = MURMUR3_ROTL64(out.h2,31);
out.h2 += out.h1;
out.h2 = out.h2*5+0x38495ab5;
}
Expand All @@ -144,7 +138,7 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
case 11: k2 ^= ((uint64_t)tail[10]) << 16; // falls through
case 10: k2 ^= ((uint64_t)tail[ 9]) << 8; // falls through
case 9: k2 ^= ((uint64_t)tail[ 8]) << 0;
k2 *= c2; k2 = ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
k2 *= c2; k2 = MURMUR3_ROTL64(k2,33); k2 *= c1; out.h2 ^= k2;
// falls through
case 8: k1 ^= ((uint64_t)tail[ 7]) << 56; // falls through
case 7: k1 ^= ((uint64_t)tail[ 6]) << 48; // falls through
Expand All @@ -154,7 +148,7 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t
case 3: k1 ^= ((uint64_t)tail[ 2]) << 16; // falls through
case 2: k1 ^= ((uint64_t)tail[ 1]) << 8; // falls through
case 1: k1 ^= ((uint64_t)tail[ 0]) << 0;
k1 *= c1; k1 = ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
k1 *= c1; k1 = MURMUR3_ROTL64(k1,31); k1 *= c2; out.h1 ^= k1;
};

//----------
Expand All @@ -175,10 +169,14 @@ FORCE_INLINE void MurmurHash3_x64_128(const void* key, size_t lenBytes, uint64_t

//-----------------------------------------------------------------------------

FORCE_INLINE uint16_t compute_seed_hash(uint64_t seed) {
MURMUR3_FORCE_INLINE uint16_t compute_seed_hash(uint64_t seed) {
HashState hashes;
MurmurHash3_x64_128(&seed, sizeof(seed), 0, hashes);
return static_cast<uint16_t>(hashes.h1 & 0xffff);
}

#undef MURMUR3_FORCE_INLINE
#undef MURMUR3_ROTL64
#undef MURMUR3_BIG_CONSTANT

#endif // _MURMURHASH3_H_
1 change: 1 addition & 0 deletions 3rd/datasketches/common/include/binomial_bounds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <algorithm>
#include <cmath>
#include <stdexcept>

/*
* This class enables the estimation of error bounds given a sample set size, the sampling
Expand Down
Loading