This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ElektraInitiative/master
Updating fork
- Loading branch information
Showing
699 changed files
with
33,396 additions
and
5,465 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -23,7 +23,7 @@ bsd_task: | |
- &create_and_chage_to_build_dir mkdir build && cd build | ||
- > # We use `-std=c11`, since the header `math.h` on FreeBSD requires C11 features | ||
cmake | ||
-DBINDINGS=ALL | ||
-DBINDINGS='ALL;-io_glib' | ||
-DCMAKE_SKIP_INSTALL_RPATH=ON | ||
-DCOMMON_FLAGS=-Werror | ||
-DC_STD=-std=c11 | ||
|
@@ -130,7 +130,7 @@ mac_task: | |
brew install python@2; brew link --overwrite python@2 | ||
brew install python || brew upgrade python | ||
- | # Install Python packages | ||
pip install cmake-format pyyaml | ||
pip install cmake-format[yaml]==0.4.5 | ||
- | # Install Ruby | ||
brew install [email protected] | ||
- | # Install Ruby gems | ||
|
@@ -184,3 +184,32 @@ mac_task: | |
printf '. Please add the files shown above to `ElektraUninstall.cmake`.\n' | ||
false | ||
fi | ||
linux_task: | ||
matrix: | ||
|
||
- name: 🔗 Check | ||
container: | ||
dockerfile: scripts/docker/cirrus/Dockerfile | ||
|
||
script: | ||
- mkdir build && cd build | ||
- > | ||
cmake -GNinja .. | ||
-DBUILD_FULL=OFF | ||
-DBUILD_SHARED=OFF | ||
-DBUILD_STATIC=OFF | ||
-DBUILD_TESTING=OFF | ||
- cd .. | ||
- ninja -C build 2>&1 | grep 'warning: invalid link' > broken_links.txt || true | ||
- scripts/link-checker build/external-links.txt 2>> broken_links.txt > /dev/null | ||
|
||
tests_script: | ||
- | | ||
if test -s broken_links.txt; then | ||
printf >&2 'Broken Links:\n' | ||
printf >&2 '—————————————\n' | ||
cat >&2 broken_links.txt | ||
printf >&2 '—————————————\n' | ||
false | ||
fi |
This file contains 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 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 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 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 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 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 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 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,67 @@ | ||
/** | ||
* @file | ||
* | ||
* @brief Benchmark for KDB | ||
* | ||
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org) | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
#include <benchmarks.h> | ||
#include <kdb.h> | ||
|
||
#define NUM_RUNS 7 | ||
|
||
#define CSV_STR_FMT "%s;%s;%d\n" | ||
|
||
|
||
static void benchmarkDel (void) | ||
{ | ||
ksDel (large); | ||
} | ||
|
||
int main (void) | ||
{ | ||
benchmarkCreate (); | ||
benchmarkFillup (); | ||
|
||
fprintf (stdout, "%s;%s;%s\n", "plugin", "operation", "microseconds"); | ||
{ | ||
KeySet * returned = ksNew (0, KS_END); | ||
Key * parentKey = keyNew ("user", KEY_END); | ||
|
||
timeInit (); | ||
KDB * handle = kdbOpen (parentKey); | ||
fprintf (stdout, CSV_STR_FMT, "core", "kdbOpen", timeGetDiffMicroseconds ()); | ||
|
||
kdbGet (handle, returned, parentKey); | ||
fprintf (stdout, CSV_STR_FMT, "core", "kdbGet", timeGetDiffMicroseconds ()); | ||
|
||
// ksAppend (returned, large); | ||
kdbSet (handle, large, parentKey); | ||
fprintf (stdout, CSV_STR_FMT, "core", "kdbSet", timeGetDiffMicroseconds ()); | ||
kdbClose (handle, parentKey); | ||
keyDel (parentKey); | ||
ksDel (returned); | ||
} | ||
|
||
for (size_t i = 0; i < NUM_RUNS; ++i) | ||
{ | ||
timeInit (); | ||
Key * parentKey = keyNew ("user/benchmark", KEY_END); | ||
KDB * handle = kdbOpen (parentKey); | ||
fprintf (stdout, CSV_STR_FMT, "core", "kdbOpen", timeGetDiffMicroseconds ()); | ||
|
||
KeySet * returned = ksNew (0, KS_END); | ||
timeInit (); | ||
kdbGet (handle, returned, parentKey); | ||
fprintf (stdout, CSV_STR_FMT, "core", "kdbGet", timeGetDiffMicroseconds ()); | ||
|
||
kdbClose (handle, parentKey); | ||
ksDel (returned); | ||
keyDel (parentKey); | ||
} | ||
|
||
benchmarkDel (); | ||
} |
Oops, something went wrong.