├── .clang-format ├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── CODEOWNERS ├── Doxyfile ├── LICENSE ├── Makefile ├── README.md ├── VERSION ├── auto ├── autolib ├── autolib.sh ├── build.sh ├── cmd │ ├── build │ ├── clean │ ├── dev │ ├── docs │ ├── format │ ├── package │ ├── smoke │ └── test ├── docker.sh ├── env.sh ├── output.sh └── test.sh ├── docker └── Makefile ├── docs ├── annotated.html ├── bc_s.png ├── bdwn.png ├── classes.html ├── closed.png ├── dir_000003_000000.html ├── dir_21619567660c3332e6a61228c76007f9.html ├── dir_21619567660c3332e6a61228c76007f9_dep.dot ├── dir_21619567660c3332e6a61228c76007f9_dep.map ├── dir_21619567660c3332e6a61228c76007f9_dep.md5 ├── dir_21619567660c3332e6a61228c76007f9_dep.png ├── dir_2c63f04010e7ff462eba5e344f58cd21.html ├── dir_83821d63a26a6eb889c4977bd95ca990.html ├── dir_8d140c3a8bac3cd45205c9ea74fd211f.html ├── dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.dot ├── dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.map ├── dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.md5 ├── dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.png ├── doc.png ├── doxygen.css ├── doxygen.png ├── dynsections.js ├── files.html ├── folderclosed.png ├── folderopen.png ├── functions.html ├── functions_vars.html ├── globals.html ├── globals_defs.html ├── globals_enum.html ├── globals_eval.html ├── globals_func.html ├── globals_type.html ├── globals_vars.html ├── graph_legend.dot ├── graph_legend.html ├── graph_legend.md5 ├── graph_legend.png ├── index.html ├── jquery.js ├── menu.js ├── menudata.js ├── nav_f.png ├── nav_g.png ├── nav_h.png ├── open.png ├── pages.html ├── prom_8h.html ├── prom_8h__dep__incl.dot ├── prom_8h__dep__incl.map ├── prom_8h__dep__incl.md5 ├── prom_8h__dep__incl.png ├── prom_8h__incl.dot ├── prom_8h__incl.map ├── prom_8h__incl.md5 ├── prom_8h__incl.png ├── prom_8h_source.html ├── prom__alloc_8h.html ├── prom__alloc_8h__dep__incl.map ├── prom__alloc_8h__dep__incl.md5 ├── prom__alloc_8h__dep__incl.png ├── prom__alloc_8h__incl.map ├── prom__alloc_8h__incl.md5 ├── prom__alloc_8h__incl.png ├── prom__alloc_8h_source.html ├── prom__collector_8h.html ├── prom__collector_8h__dep__incl.dot ├── prom__collector_8h__dep__incl.map ├── prom__collector_8h__dep__incl.md5 ├── prom__collector_8h__dep__incl.png ├── prom__collector_8h__incl.dot ├── prom__collector_8h__incl.map ├── prom__collector_8h__incl.md5 ├── prom__collector_8h__incl.png ├── prom__collector_8h_source.html ├── prom__collector__registry_8h.html ├── prom__collector__registry_8h__dep__incl.dot ├── prom__collector__registry_8h__dep__incl.map ├── prom__collector__registry_8h__dep__incl.md5 ├── prom__collector__registry_8h__dep__incl.png ├── prom__collector__registry_8h__incl.dot ├── prom__collector__registry_8h__incl.map ├── prom__collector__registry_8h__incl.md5 ├── prom__collector__registry_8h__incl.png ├── prom__collector__registry_8h_source.html ├── prom__counter_8h.html ├── prom__counter_8h__dep__incl.dot ├── prom__counter_8h__dep__incl.map ├── prom__counter_8h__dep__incl.md5 ├── prom__counter_8h__dep__incl.png ├── prom__counter_8h__incl.dot ├── prom__counter_8h__incl.map ├── prom__counter_8h__incl.md5 ├── prom__counter_8h__incl.png ├── prom__counter_8h_source.html ├── prom__errors_8h.html ├── prom__errors_8h__dep__incl.dot ├── prom__errors_8h__dep__incl.map ├── prom__errors_8h__dep__incl.md5 ├── prom__errors_8h__dep__incl.png ├── prom__errors_8h_source.html ├── prom__gauge_8h.html ├── prom__gauge_8h__dep__incl.dot ├── prom__gauge_8h__dep__incl.map ├── prom__gauge_8h__dep__incl.md5 ├── prom__gauge_8h__dep__incl.png ├── prom__gauge_8h__incl.dot ├── prom__gauge_8h__incl.map ├── prom__gauge_8h__incl.md5 ├── prom__gauge_8h__incl.png ├── prom__gauge_8h_source.html ├── prom__histogram_8h.html ├── prom__histogram_8h__dep__incl.dot ├── prom__histogram_8h__dep__incl.map ├── prom__histogram_8h__dep__incl.md5 ├── prom__histogram_8h__dep__incl.png ├── prom__histogram_8h__incl.dot ├── prom__histogram_8h__incl.map ├── prom__histogram_8h__incl.md5 ├── prom__histogram_8h__incl.png ├── prom__histogram_8h_source.html ├── prom__histogram__buckets_8h.html ├── prom__histogram__buckets_8h__dep__incl.dot ├── prom__histogram__buckets_8h__dep__incl.map ├── prom__histogram__buckets_8h__dep__incl.md5 ├── prom__histogram__buckets_8h__dep__incl.png ├── prom__histogram__buckets_8h__incl.map ├── prom__histogram__buckets_8h__incl.md5 ├── prom__histogram__buckets_8h__incl.png ├── prom__histogram__buckets_8h_source.html ├── prom__linked__list_8h_source.html ├── prom__map_8h_source.html ├── prom__metric_8h.html ├── prom__metric_8h__dep__incl.dot ├── prom__metric_8h__dep__incl.map ├── prom__metric_8h__dep__incl.md5 ├── prom__metric_8h__dep__incl.png ├── prom__metric_8h__incl.dot ├── prom__metric_8h__incl.map ├── prom__metric_8h__incl.md5 ├── prom__metric_8h__incl.png ├── prom__metric_8h_source.html ├── prom__metric__sample_8h.html ├── prom__metric__sample_8h__dep__incl.dot ├── prom__metric__sample_8h__dep__incl.map ├── prom__metric__sample_8h__dep__incl.md5 ├── prom__metric__sample_8h__dep__incl.png ├── prom__metric__sample_8h__incl.dot ├── prom__metric__sample_8h__incl.map ├── prom__metric__sample_8h__incl.md5 ├── prom__metric__sample_8h__incl.png ├── prom__metric__sample_8h_source.html ├── prom__metric__sample__histogram_8h.html ├── prom__metric__sample__histogram_8h__dep__incl.dot ├── prom__metric__sample__histogram_8h__dep__incl.map ├── prom__metric__sample__histogram_8h__dep__incl.md5 ├── prom__metric__sample__histogram_8h__dep__incl.png ├── prom__metric__sample__histogram_8h__incl.dot ├── prom__metric__sample__histogram_8h__incl.map ├── prom__metric__sample__histogram_8h__incl.md5 ├── prom__metric__sample__histogram_8h__incl.png ├── prom__metric__sample__histogram_8h_source.html ├── promhttp_8h.html ├── promhttp_8h__incl.dot ├── promhttp_8h__incl.map ├── promhttp_8h__incl.md5 ├── promhttp_8h__incl.png ├── promhttp_8h_source.html ├── search │ ├── all_0.html │ ├── all_0.js │ ├── all_1.html │ ├── all_1.js │ ├── all_2.html │ ├── all_2.js │ ├── all_3.html │ ├── all_3.js │ ├── all_4.html │ ├── all_4.js │ ├── classes_0.html │ ├── classes_0.js │ ├── close.png │ ├── defines_0.html │ ├── defines_0.js │ ├── enums_0.html │ ├── enums_0.js │ ├── enumvalues_0.html │ ├── enumvalues_0.js │ ├── files_0.html │ ├── files_0.js │ ├── functions_0.html │ ├── functions_0.js │ ├── mag_sel.png │ ├── nomatches.html │ ├── pages_0.html │ ├── pages_0.js │ ├── pages_1.html │ ├── pages_1.js │ ├── search.css │ ├── search.js │ ├── search_l.png │ ├── search_m.png │ ├── search_r.png │ ├── searchdata.js │ ├── typedefs_0.html │ ├── typedefs_0.js │ ├── variables_0.html │ ├── variables_0.js │ ├── variables_1.html │ ├── variables_1.js │ ├── variables_2.html │ └── variables_2.js ├── splitbar.png ├── structprom__histogram__buckets-members.html ├── structprom__histogram__buckets.html ├── sync_off.png ├── sync_on.png ├── tab_a.png ├── tab_b.png ├── tab_h.png ├── tab_s.png ├── tabs.css └── todo.html ├── example ├── Makefile ├── README.md ├── bar.c ├── bar.h ├── foo.c ├── foo.h └── main.c ├── prom ├── CMakeLists.txt ├── include │ ├── prom.h │ ├── prom_alloc.h │ ├── prom_collector.h │ ├── prom_collector_registry.h │ ├── prom_counter.h │ ├── prom_gauge.h │ ├── prom_histogram.h │ ├── prom_histogram_buckets.h │ ├── prom_linked_list.h │ ├── prom_map.h │ ├── prom_metric.h │ ├── prom_metric_sample.h │ └── prom_metric_sample_histogram.h ├── src │ ├── prom_assert.h │ ├── prom_collector.c │ ├── prom_collector_registry.c │ ├── prom_collector_registry_i.h │ ├── prom_collector_registry_t.h │ ├── prom_collector_t.h │ ├── prom_counter.c │ ├── prom_errors.h │ ├── prom_gauge.c │ ├── prom_histogram.c │ ├── prom_histogram_buckets.c │ ├── prom_linked_list.c │ ├── prom_linked_list_i.h │ ├── prom_linked_list_t.h │ ├── prom_log.h │ ├── prom_map.c │ ├── prom_map_i.h │ ├── prom_map_t.h │ ├── prom_metric.c │ ├── prom_metric_formatter.c │ ├── prom_metric_formatter_i.h │ ├── prom_metric_formatter_t.h │ ├── prom_metric_i.h │ ├── prom_metric_sample.c │ ├── prom_metric_sample_histogram.c │ ├── prom_metric_sample_histogram_i.h │ ├── prom_metric_sample_histogram_t.h │ ├── prom_metric_sample_i.h │ ├── prom_metric_sample_t.h │ ├── prom_metric_t.h │ ├── prom_process_fds.c │ ├── prom_process_fds_i.h │ ├── prom_process_fds_t.h │ ├── prom_process_limits.c │ ├── prom_process_limits_i.h │ ├── prom_process_limits_t.h │ ├── prom_process_stat.c │ ├── prom_process_stat_i.h │ ├── prom_process_stat_t.h │ ├── prom_procfs.c │ ├── prom_procfs_i.h │ ├── prom_procfs_t.h │ ├── prom_string_builder.c │ ├── prom_string_builder_i.h │ └── prom_string_builder_t.h └── test │ ├── CMakeLists.txt │ ├── fixtures │ ├── limits │ └── stat │ ├── prom_collector_registry_test.c │ ├── prom_collector_test.c │ ├── prom_counter_test.c │ ├── prom_gauge_test.c │ ├── prom_histogram_buckets_test.c │ ├── prom_histogram_test.c │ ├── prom_linked_list_test.c │ ├── prom_map_test.c │ ├── prom_metric_formatter_test.c │ ├── prom_metric_sample_test.c │ ├── prom_metric_test.c │ ├── prom_process_limits_test.c │ ├── prom_procfs_test.c │ ├── prom_string_builder_test.c │ ├── prom_test_helpers.c │ └── prom_test_helpers.h ├── promhttp ├── CMakeLists.txt ├── include │ └── promhttp.h └── src │ └── promhttp.c ├── promtest ├── CMakeLists.txt └── test │ ├── promtest.c │ ├── promtest_counter.c │ ├── promtest_counter.h │ ├── promtest_gauge.c │ ├── promtest_gauge.h │ ├── promtest_helpers.c │ ├── promtest_helpers.h │ ├── promtest_histogram.c │ └── promtest_histogram.h └── vendor ├── Unity-2.4.3 ├── .gitattributes ├── .gitignore ├── .travis.yml ├── README.md ├── auto │ ├── colour_prompt.rb │ ├── colour_reporter.rb │ ├── generate_config.yml │ ├── generate_module.rb │ ├── generate_test_runner.rb │ ├── parse_output.rb │ ├── stylize_as_junit.rb │ ├── test_file_filter.rb │ ├── type_sanitizer.rb │ ├── unity_test_summary.py │ ├── unity_test_summary.rb │ └── unity_to_junit.py ├── docs │ ├── ThrowTheSwitchCodingStandard.md │ ├── UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf │ ├── UnityAssertionsReference.md │ ├── UnityConfigurationGuide.md │ ├── UnityGettingStartedGuide.md │ ├── UnityHelperScriptsGuide.md │ └── license.txt ├── examples │ ├── example_1 │ │ ├── makefile │ │ ├── readme.txt │ │ ├── src │ │ │ ├── ProductionCode.c │ │ │ ├── ProductionCode.h │ │ │ ├── ProductionCode2.c │ │ │ └── ProductionCode2.h │ │ └── test │ │ │ ├── TestProductionCode.c │ │ │ ├── TestProductionCode2.c │ │ │ └── test_runners │ │ │ ├── TestProductionCode2_Runner.c │ │ │ └── TestProductionCode_Runner.c │ ├── example_2 │ │ ├── makefile │ │ ├── readme.txt │ │ ├── src │ │ │ ├── ProductionCode.c │ │ │ ├── ProductionCode.h │ │ │ ├── ProductionCode2.c │ │ │ └── ProductionCode2.h │ │ └── test │ │ │ ├── TestProductionCode.c │ │ │ ├── TestProductionCode2.c │ │ │ └── test_runners │ │ │ ├── TestProductionCode2_Runner.c │ │ │ ├── TestProductionCode_Runner.c │ │ │ └── all_tests.c │ ├── example_3 │ │ ├── helper │ │ │ ├── UnityHelper.c │ │ │ └── UnityHelper.h │ │ ├── rakefile.rb │ │ ├── rakefile_helper.rb │ │ ├── readme.txt │ │ ├── src │ │ │ ├── ProductionCode.c │ │ │ ├── ProductionCode.h │ │ │ ├── ProductionCode2.c │ │ │ └── ProductionCode2.h │ │ ├── target_gcc_32.yml │ │ └── test │ │ │ ├── TestProductionCode.c │ │ │ └── TestProductionCode2.c │ └── unity_config.h ├── extras │ ├── eclipse │ │ └── error_parsers.txt │ └── fixture │ │ ├── rakefile.rb │ │ ├── rakefile_helper.rb │ │ ├── readme.txt │ │ ├── src │ │ ├── unity_fixture.c │ │ ├── unity_fixture.h │ │ ├── unity_fixture_internals.h │ │ └── unity_fixture_malloc_overrides.h │ │ └── test │ │ ├── Makefile │ │ ├── main │ │ └── AllTests.c │ │ ├── template_fixture_tests.c │ │ ├── unity_fixture_Test.c │ │ ├── unity_fixture_TestRunner.c │ │ ├── unity_output_Spy.c │ │ └── unity_output_Spy.h ├── release │ ├── build.info │ └── version.info ├── src │ ├── unity.c │ ├── unity.h │ └── unity_internals.h └── test │ ├── .rubocop.yml │ ├── Makefile │ ├── expectdata │ ├── testsample_cmd.c │ ├── testsample_def.c │ ├── testsample_head1.c │ ├── testsample_head1.h │ ├── testsample_mock_cmd.c │ ├── testsample_mock_def.c │ ├── testsample_mock_head1.c │ ├── testsample_mock_head1.h │ ├── testsample_mock_new1.c │ ├── testsample_mock_new2.c │ ├── testsample_mock_param.c │ ├── testsample_mock_run1.c │ ├── testsample_mock_run2.c │ ├── testsample_mock_yaml.c │ ├── testsample_new1.c │ ├── testsample_new2.c │ ├── testsample_param.c │ ├── testsample_run1.c │ ├── testsample_run2.c │ └── testsample_yaml.c │ ├── rakefile │ ├── rakefile_helper.rb │ ├── spec │ └── generate_module_existing_file_spec.rb │ ├── targets │ ├── clang_file.yml │ ├── clang_strict.yml │ ├── gcc_32.yml │ ├── gcc_64.yml │ ├── gcc_auto_limits.yml │ ├── gcc_auto_stdint.yml │ ├── gcc_manual_math.yml │ ├── hitech_picc18.yml │ ├── iar_arm_v4.yml │ ├── iar_arm_v5.yml │ ├── iar_arm_v5_3.yml │ ├── iar_armcortex_LM3S9B92_v5_4.yml │ ├── iar_cortexm3_v5.yml │ ├── iar_msp430.yml │ └── iar_sh2a_v6.yml │ ├── testdata │ ├── CException.h │ ├── Defs.h │ ├── cmock.h │ ├── mockMock.h │ ├── testRunnerGenerator.c │ ├── testRunnerGeneratorSmall.c │ └── testRunnerGeneratorWithMocks.c │ └── tests │ ├── test_generate_test_runner.rb │ ├── testparameterized.c │ └── testunity.c ├── parson ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── Makefile ├── README.md ├── package.json ├── parson.c ├── parson.h ├── tests.c └── tests │ ├── test_1_1.txt │ ├── test_1_2.txt │ ├── test_1_3.txt │ ├── test_2.txt │ ├── test_2_comments.txt │ ├── test_2_pretty.txt │ └── test_5.txt └── src └── Unity-stamp ├── Unity-mkdir ├── Unity-urlinfo.txt ├── download-Unity.cmake ├── extract-Unity.cmake └── verify-Unity.cmake /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | ColumnLimit: 120 -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | # This workflow is triggered on pushes to the repository. 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | ubuntu-20-04: 9 | name: ubuntu-20-04 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: test 14 | env: 15 | DOCKER_IMAGE: ubuntu:20.04 16 | CI: 1 17 | run: make 18 | ubuntu-18-04: 19 | name: ubuntu-18-04 20 | runs-on: ubuntu-latest 21 | steps: 22 | - uses: actions/checkout@v2 23 | - name: test 24 | env: 25 | DOCKER_IMAGE: ubuntu:18.04 26 | CI: 1 27 | run: make 28 | ubuntu-16-04: 29 | name: ubuntu-16-04 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@v2 33 | - name: test 34 | env: 35 | DOCKER_IMAGE: ubuntu:16.04 36 | CI: 1 37 | run: make 38 | debian-buster: 39 | name: debian-buster 40 | runs-on: ubuntu-latest 41 | steps: 42 | - uses: actions/checkout@v2 43 | - name: test 44 | env: 45 | DOCKER_IMAGE: debian:buster 46 | CI: 1 47 | run: make 48 | debian-stretch: 49 | name: debian-stretch 50 | runs-on: ubuntu-latest 51 | steps: 52 | - uses: actions/checkout@v2 53 | - name: test 54 | env: 55 | DOCKER_IMAGE: debian:stretch 56 | CI: 1 57 | run: make 58 | debian-jessie: 59 | name: debian-jessie 60 | runs-on: ubuntu-latest 61 | steps: 62 | - uses: actions/checkout@v2 63 | - name: test 64 | env: 65 | DOCKER_IMAGE: debian:jessie 66 | CI: 1 67 | run: make -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .*.swp 2 | docker/Dockerfile 3 | .vscode 4 | prom/build/* 5 | promhttp/build/* 6 | promtest/build/* 7 | tty.gif 8 | ttyrecord 9 | _CPack_Packages/ 10 | *deb 11 | *tar.gz 12 | *vgcore* 13 | *.o 14 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @digitalocean/timeseries -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | All rights, title, and interest in this project are owned and licensed to you as set forth below by DigitalOcean, LLC. 2 | 3 | ---- 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | SHELL = /bin/bash 3 | 4 | GITHUB_ORG = digitalocean 5 | 6 | # Origin does not point to https://github.com/digitalocean/prometheus-client-c.git in TravisCI so we must add a new 7 | # remote for fetching. Fetch master, diff on the filenames and look for C files. If no changes to C files are made, skip 8 | # the build. 9 | CHANGED_FILES = $(shell git remote add ci https://github.com/${GITHUB_ORG}/prometheus-client-c.git > /dev/null 2>&1; git fetch ci master > /dev/null 2>&1; git diff --name-only ci/master | egrep -v '.*\.md$$') 10 | 11 | ifneq ($(shell echo "x${CHANGED_FILES}x" | sed 's/\n\t //'), xx) 12 | default: build_and_test 13 | else 14 | default: build_and_test 15 | # default: changed_files 16 | # @echo -e "\033[1;32mNothing to build\033[0m" 17 | endif 18 | 19 | build_and_test: changed_files clean build test package smoke 20 | .PHONY: build_and_test 21 | 22 | all: build_and_test docs 23 | .PHONY: all 24 | 25 | clean: 26 | ./auto dev -e auto -a clean 27 | 28 | build: clean 29 | ./auto dev -e auto -a build -a -t 30 | .PHONY: build 31 | 32 | test: build 33 | ./auto dev -e auto -a test 34 | .PHONY: test 35 | 36 | package: test 37 | ./auto dev -e auto -a package 38 | .PHONY: smoke 39 | 40 | docs: smoke 41 | ./auto dev -e auto -a docs 42 | .PHONY: package 43 | 44 | changed_files: 45 | @echo "Changed C files: ${CHANGED_FILES}" 46 | .PHONY: changed_files 47 | 48 | smoke: package 49 | ./auto dev -e auto -a smoke 50 | .PHONY: smoke 51 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.1.3 2 | -------------------------------------------------------------------------------- /autolib/autolib.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | lib="$(dirname ${BASH_SOURCE[0]})" 4 | 5 | source "${lib}/output.sh" 6 | source "${lib}/build.sh" 7 | source "${lib}/docker.sh" 8 | source "${lib}/env.sh" 9 | source "${lib}/test.sh" 10 | -------------------------------------------------------------------------------- /autolib/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | lib="$(dirname ${BASH_SOURCE[0]})" 4 | 5 | source "${lib}/env.sh" 6 | source "${lib}/output.sh" 7 | 8 | # build all libraries 9 | autolib_build() { 10 | local lib=$1 11 | local build_test=$2 12 | 13 | if [[ ! -d ${lib}/build ]]; then 14 | mkdir ${lib}/build || { 15 | autolib_output_error "Failed to create build directory" 16 | return 1 17 | } 18 | fi 19 | pushd ${lib}/build > /dev/null || return $? 20 | autolib_output_banner "${lib}: CMake Build Stage" 21 | # YOU MUST set TEST to 1 in order to build the tests 22 | TEST=$build_test cmake -v .. || { 23 | autolib_output_error "${lib}: CMake Failure" 24 | return 1 25 | } 26 | autolib_output_banner "${lib}: Make Build Stage" 27 | make || { 28 | autolib_output_error "${lib} Make Failure" 29 | return 1 30 | } 31 | popd > /dev/null || return $? 32 | } -------------------------------------------------------------------------------- /autolib/env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | autolib_check_dev(){ 4 | local dev=${DEV:=0} 5 | if (( dev == 0 )); then 6 | autolib_output_err "Not executing in the Docker environment" 7 | return 1 8 | fi 9 | } -------------------------------------------------------------------------------- /autolib/output.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Print a stage. Pass a string to be enveloped in a banner. 4 | autolib_output_banner(){ 5 | echo -e "\n\033[1m########################################################################\033[0m" >&2 6 | echo -e "\033[1m> $@\033[0m" >&2 7 | echo -e "\033[1m########################################################################\033[0m\n" >&2 8 | } 9 | 10 | autolib_output_error() { 11 | echo -e "\033[1;31mERROR: $@\033[0m" >&2 12 | } 13 | 14 | autolib_output_success() { 15 | echo -e "\033[1;32mSUCCESS: $@\033[0m" >&2 16 | } 17 | 18 | autolib_output_warn() { 19 | echo -e "\033[1;33mWARN: $@\033[0m" >&2 20 | } -------------------------------------------------------------------------------- /autolib/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | lib="$(dirname ${BASH_SOURCE[0]})" 4 | 5 | source "${lib}/output.sh" 6 | 7 | autolib_test() { 8 | local library="$1" 9 | local r 10 | pushd ${lib}/build > /dev/null || return $? 11 | autolib_output_banner "${library}: Starting Tests" 12 | ARGS=' --track-origins=yes --output-on-failure=yes --verbose' make test && { 13 | r=$? 14 | autolib_output_success "${library}: Test Pass" 15 | } || { 16 | r=$? 17 | autolib_output_error "${library}: Test Failure" 18 | } 19 | popd > /dev/null || return $? 20 | return $r 21 | } 22 | 23 | autolib_mem_test() { 24 | local library="$1" 25 | local r 26 | pushd ${library} > /dev/null || return $? 27 | autolib_output_banner "${library}: Starting MemTests" 28 | while read test_file; do 29 | valgrind --leak-check=full --error-exitcode=1 --num-callers=30 "$test_file" && { 30 | r=$? 31 | autolib_output_success "${library} ${test_file}: MemTest Pass" 32 | } || { 33 | r=$? 34 | autolib_output_error "${library} ${test_file}: MemTest Failure" 35 | } 36 | done < <(find build -maxdepth 1 -regex ".*prom.*test$") 37 | popd > /dev/null || return $? 38 | return $r 39 | } -------------------------------------------------------------------------------- /docker/Makefile: -------------------------------------------------------------------------------- 1 | docker: 2 | docker build -t prometheus-client-c-dev . -------------------------------------------------------------------------------- /docs/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/bc_s.png -------------------------------------------------------------------------------- /docs/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/bdwn.png -------------------------------------------------------------------------------- /docs/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/closed.png -------------------------------------------------------------------------------- /docs/dir_21619567660c3332e6a61228c76007f9_dep.dot: -------------------------------------------------------------------------------- 1 | digraph "promhttp" { 2 | compound=true 3 | node [ fontsize="10", fontname="Helvetica"]; 4 | edge [ labelfontsize="10", labelfontname="Helvetica"]; 5 | subgraph clusterdir_21619567660c3332e6a61228c76007f9 { 6 | graph [ bgcolor="#eeeeff", pencolor="black", label="" URL="dir_21619567660c3332e6a61228c76007f9.html"]; 7 | dir_21619567660c3332e6a61228c76007f9 [shape=plaintext label="promhttp"]; 8 | dir_8d140c3a8bac3cd45205c9ea74fd211f [shape=box label="include" color="black" fillcolor="white" style="filled" URL="dir_8d140c3a8bac3cd45205c9ea74fd211f.html"]; 9 | } 10 | dir_2c63f04010e7ff462eba5e344f58cd21 [shape=box label="prom" fillcolor="white" style="filled" color="red" URL="dir_2c63f04010e7ff462eba5e344f58cd21.html"]; 11 | dir_8d140c3a8bac3cd45205c9ea74fd211f->dir_2c63f04010e7ff462eba5e344f58cd21 [headlabel="1", labeldistance=1.5 headhref="dir_000003_000000.html"]; 12 | } 13 | -------------------------------------------------------------------------------- /docs/dir_21619567660c3332e6a61228c76007f9_dep.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/dir_21619567660c3332e6a61228c76007f9_dep.md5: -------------------------------------------------------------------------------- 1 | 5a733acb8d15f543b6a2b5e7983b6f1e -------------------------------------------------------------------------------- /docs/dir_21619567660c3332e6a61228c76007f9_dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/dir_21619567660c3332e6a61228c76007f9_dep.png -------------------------------------------------------------------------------- /docs/dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.dot: -------------------------------------------------------------------------------- 1 | digraph "promhttp/include" { 2 | compound=true 3 | node [ fontsize="10", fontname="Helvetica"]; 4 | edge [ labelfontsize="10", labelfontname="Helvetica"]; 5 | subgraph clusterdir_21619567660c3332e6a61228c76007f9 { 6 | graph [ bgcolor="#ddddee", pencolor="black", label="promhttp" fontname="Helvetica", fontsize="10", URL="dir_21619567660c3332e6a61228c76007f9.html"] 7 | dir_8d140c3a8bac3cd45205c9ea74fd211f [shape=box, label="include", style="filled", fillcolor="#eeeeff", pencolor="black", URL="dir_8d140c3a8bac3cd45205c9ea74fd211f.html"]; 8 | } 9 | dir_2c63f04010e7ff462eba5e344f58cd21 [shape=box label="prom" fillcolor="white" style="filled" color="red" URL="dir_2c63f04010e7ff462eba5e344f58cd21.html"]; 10 | dir_8d140c3a8bac3cd45205c9ea74fd211f->dir_2c63f04010e7ff462eba5e344f58cd21 [headlabel="1", labeldistance=1.5 headhref="dir_000003_000000.html"]; 11 | } 12 | -------------------------------------------------------------------------------- /docs/dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.md5: -------------------------------------------------------------------------------- 1 | 409e6884fb8a90bc89f51c346dd9a368 -------------------------------------------------------------------------------- /docs/dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/dir_8d140c3a8bac3cd45205c9ea74fd211f_dep.png -------------------------------------------------------------------------------- /docs/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/doc.png -------------------------------------------------------------------------------- /docs/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/doxygen.png -------------------------------------------------------------------------------- /docs/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/folderclosed.png -------------------------------------------------------------------------------- /docs/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/folderopen.png -------------------------------------------------------------------------------- /docs/graph_legend.md5: -------------------------------------------------------------------------------- 1 | 387ff8eb65306fa251338d3c9bd7bfff -------------------------------------------------------------------------------- /docs/graph_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/graph_legend.png -------------------------------------------------------------------------------- /docs/menudata.js: -------------------------------------------------------------------------------- 1 | var menudata={children:[ 2 | {text:"Main Page",url:"index.html"}, 3 | {text:"Related Pages",url:"pages.html"}, 4 | {text:"Classes",url:"annotated.html",children:[ 5 | {text:"Class List",url:"annotated.html"}, 6 | {text:"Class Index",url:"classes.html"}, 7 | {text:"Class Members",url:"functions.html",children:[ 8 | {text:"All",url:"functions.html"}, 9 | {text:"Variables",url:"functions_vars.html"}]}]}, 10 | {text:"Files",url:"files.html",children:[ 11 | {text:"File List",url:"files.html"}, 12 | {text:"File Members",url:"globals.html",children:[ 13 | {text:"All",url:"globals.html",children:[ 14 | {text:"p",url:"globals.html#index_p"}]}, 15 | {text:"Functions",url:"globals_func.html",children:[ 16 | {text:"p",url:"globals_func.html#index_p"}]}, 17 | {text:"Variables",url:"globals_vars.html"}, 18 | {text:"Typedefs",url:"globals_type.html"}, 19 | {text:"Macros",url:"globals_defs.html"}]}]}]} 20 | -------------------------------------------------------------------------------- /docs/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/nav_f.png -------------------------------------------------------------------------------- /docs/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/nav_g.png -------------------------------------------------------------------------------- /docs/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/nav_h.png -------------------------------------------------------------------------------- /docs/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/open.png -------------------------------------------------------------------------------- /docs/prom_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node14 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node14 -> Node15 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node15 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 8 | } 9 | -------------------------------------------------------------------------------- /docs/prom_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | f447616eb8315fa589f0311f234bb94a -------------------------------------------------------------------------------- /docs/prom_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 677399fcd69b240a1463fdb0fb412cbb -------------------------------------------------------------------------------- /docs/prom_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__alloc_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__alloc_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 5b924c712bed7489a2830deb6f9f3c5c -------------------------------------------------------------------------------- /docs/prom__alloc_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__alloc_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__alloc_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/prom__alloc_8h__incl.md5: -------------------------------------------------------------------------------- 1 | ca0ae2ac88b74acddef29bf677e42e80 -------------------------------------------------------------------------------- /docs/prom__alloc_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__alloc_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__collector_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_collector.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node6 [label="prom/include/prom_collector.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node6 -> Node7 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node7 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 8 | Node7 -> Node8 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node8 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 10 | Node6 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node9 [label="prom/include/prom_collector\l_registry.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__collector__registry_8h.html",tooltip="The collector registry registers collectors for metric exposition. "]; 12 | Node9 -> Node7 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | } 14 | -------------------------------------------------------------------------------- /docs/prom__collector_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/prom__collector_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | dcee52eb811bae7086fe3047a905fe5f -------------------------------------------------------------------------------- /docs/prom__collector_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__collector_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__collector_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_collector.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_collector.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 8 | Node0 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node2 [label="prom_map.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__map_8h_source.html"]; 10 | Node0 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node3 [label="prom_metric.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric_8h.html"]; 12 | Node3 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | Node4 [label="prom_metric_sample.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample_8h.html"]; 14 | Node4 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 15 | Node3 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 16 | Node5 [label="prom_metric_sample\l_histogram.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample__histogram_8h.html"]; 17 | Node5 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 18 | } 19 | -------------------------------------------------------------------------------- /docs/prom__collector_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/prom__collector_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 09d2f46fa501f75ec3e79295a53fe6a8 -------------------------------------------------------------------------------- /docs/prom__collector_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__collector_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_collector_registry.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node7 [label="prom/include/prom_collector\l_registry.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node7 -> Node8 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node8 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 8 | Node8 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node9 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 10 | } 11 | -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 5a1243c1b32399d7faa747e6b084c4b1 -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__collector__registry_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 72a7bb4f70815b45c471e5067710d62d -------------------------------------------------------------------------------- /docs/prom__collector__registry_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__collector__registry_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__counter_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_counter.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node6 [label="prom/include/prom_counter.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node6 -> Node7 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node7 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 8 | Node7 -> Node8 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node8 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 10 | } 11 | -------------------------------------------------------------------------------- /docs/prom__counter_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__counter_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 9a9ee0d2f72c4aa1d328ca051d3fd824 -------------------------------------------------------------------------------- /docs/prom__counter_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__counter_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__counter_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_counter.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_counter.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"]; 8 | Node0 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node2 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 10 | Node0 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node3 [label="prom_metric.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric_8h.html"]; 12 | Node3 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | Node4 [label="prom_metric_sample.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample_8h.html"]; 14 | Node4 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 15 | Node3 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 16 | Node5 [label="prom_metric_sample\l_histogram.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample__histogram_8h.html"]; 17 | Node5 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 18 | } 19 | -------------------------------------------------------------------------------- /docs/prom__counter_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/prom__counter_8h__incl.md5: -------------------------------------------------------------------------------- 1 | f79807ba83430dd8bb7c3aa0fdf691fd -------------------------------------------------------------------------------- /docs/prom__counter_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__counter_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__errors_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/prom__errors_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 5ec144d3428dc6e5fd755b94a8cb2c0f -------------------------------------------------------------------------------- /docs/prom__errors_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__errors_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__gauge_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_gauge.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node6 [label="prom/include/prom_gauge.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node6 -> Node7 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node7 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 8 | Node7 -> Node8 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node8 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 10 | } 11 | -------------------------------------------------------------------------------- /docs/prom__gauge_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__gauge_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 9c764603425f807c3f45ae990afbb05b -------------------------------------------------------------------------------- /docs/prom__gauge_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__gauge_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__gauge_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_gauge.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_gauge.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="stdlib.h",height=0.2,width=0.4,color="grey75", fillcolor="white", style="filled"]; 8 | Node0 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node2 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 10 | Node0 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node3 [label="prom_metric.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric_8h.html"]; 12 | Node3 -> Node4 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | Node4 [label="prom_metric_sample.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample_8h.html"]; 14 | Node4 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 15 | Node3 -> Node5 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 16 | Node5 [label="prom_metric_sample\l_histogram.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample__histogram_8h.html"]; 17 | Node5 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 18 | } 19 | -------------------------------------------------------------------------------- /docs/prom__gauge_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/prom__gauge_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 47f818bf60543a61a23ce02c8326abf9 -------------------------------------------------------------------------------- /docs/prom__gauge_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__gauge_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__histogram_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_histogram.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node7 [label="prom/include/prom_histogram.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node7 -> Node8 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node8 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 8 | Node8 -> Node9 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node9 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 10 | } 11 | -------------------------------------------------------------------------------- /docs/prom__histogram_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__histogram_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | a62830da148452519c6a3f03ba5fddb6 -------------------------------------------------------------------------------- /docs/prom__histogram_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__histogram_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__histogram_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/prom__histogram_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 1145cca3ba9fc021770595bc049f92c5 -------------------------------------------------------------------------------- /docs/prom__histogram_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__histogram_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__dep__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_histogram_buckets.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node1 [label="prom/include/prom_histogram\l_buckets.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node1 -> Node2 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node2 [label="prom/include/prom_histogram.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__histogram_8h.html",tooltip="https://prometheus.io/docs/concepts/metric_types/#histogram "]; 8 | Node2 -> Node3 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node3 [label="prom/include/prom.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom_8h.html",tooltip="Include prom.h to include the entire public API. "]; 10 | Node3 -> Node4 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node4 [label="promhttp/include/promhttp.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$promhttp_8h.html",tooltip="Provides a HTTP endpoint for metric exposition References: "]; 12 | Node1 -> Node3 [dir="back",color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | } 14 | -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | f5608aeb0c9a1fbb7fbf92120d7fc33b -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__histogram__buckets_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 0ecfca103c369c6b616b8deceeec2b88 -------------------------------------------------------------------------------- /docs/prom__histogram__buckets_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__histogram__buckets_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__metric_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/prom__metric_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 554bf5edce3fa4f27e05188b41f3f1b8 -------------------------------------------------------------------------------- /docs/prom__metric_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__metric_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_metric.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_metric.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="prom_metric_sample.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample_8h.html"]; 8 | Node1 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 9 | Node2 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 10 | Node0 -> Node3 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 11 | Node3 [label="prom_metric_sample\l_histogram.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__metric__sample__histogram_8h.html"]; 12 | Node3 -> Node2 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 13 | } 14 | -------------------------------------------------------------------------------- /docs/prom__metric_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/prom__metric_8h__incl.md5: -------------------------------------------------------------------------------- 1 | d98b1c11d3c4b7656cc448699687339d -------------------------------------------------------------------------------- /docs/prom__metric_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | 654edc4d34421aacaf3050ba9af6bf75 -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric__sample_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_metric_sample.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_metric\l_sample.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 8 | } 9 | -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 6bae0b9a939e04235cee6cc7512e4eb3 -------------------------------------------------------------------------------- /docs/prom__metric__sample_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric__sample_8h__incl.png -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__dep__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__dep__incl.md5: -------------------------------------------------------------------------------- 1 | f8d476210371a4f4553c084b6f1bd334 -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__dep__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric__sample__histogram_8h__dep__incl.png -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__incl.dot: -------------------------------------------------------------------------------- 1 | digraph "prom/include/prom_metric_sample_histogram.h" 2 | { 3 | edge [fontname="Helvetica",fontsize="10",labelfontname="Helvetica",labelfontsize="10"]; 4 | node [fontname="Helvetica",fontsize="10",shape=record]; 5 | Node0 [label="prom/include/prom_metric\l_sample_histogram.h",height=0.2,width=0.4,color="black", fillcolor="grey75", style="filled", fontcolor="black"]; 6 | Node0 -> Node1 [color="midnightblue",fontsize="10",style="solid",fontname="Helvetica"]; 7 | Node1 [label="prom_errors.h",height=0.2,width=0.4,color="black", fillcolor="white", style="filled",URL="$prom__errors_8h.html",tooltip="Prometheus client errors. "]; 8 | } 9 | -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__incl.md5: -------------------------------------------------------------------------------- 1 | 4a0783f96405ffb6caf6e1c466414e7b -------------------------------------------------------------------------------- /docs/prom__metric__sample__histogram_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/prom__metric__sample__histogram_8h__incl.png -------------------------------------------------------------------------------- /docs/promhttp_8h__incl.map: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/promhttp_8h__incl.md5: -------------------------------------------------------------------------------- 1 | f65d4556f9e2275a8aa84805ddc5422e -------------------------------------------------------------------------------- /docs/promhttp_8h__incl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/promhttp_8h__incl.png -------------------------------------------------------------------------------- /docs/search/all_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/all_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['count',['count',['../structprom__histogram__buckets.html#a9da20001e02d992cee82a09372061621',1,'prom_histogram_buckets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/all_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/all_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/all_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['todo_20list',['Todo List',['../todo.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/all_3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/all_3.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['upper_5fbounds',['upper_bounds',['../structprom__histogram__buckets.html#a8abda07c4930e15a3dff8a86e3164344',1,'prom_histogram_buckets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/all_4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/all_4.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['welcome_20to_20the_20documentation_20site_20for_20prometheus_2dclient_2dc_21',['Welcome to the documentation site for prometheus-client-c!',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/classes_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/classes_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5fhistogram_5fbuckets',['prom_histogram_buckets',['../structprom__histogram__buckets.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/search/close.png -------------------------------------------------------------------------------- /docs/search/defines_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/defines_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5ffree',['prom_free',['../prom__alloc_8h.html#a19b2231f9b45a520bbbcf046ed5d81ef',1,'prom_alloc.h']]], 4 | ['prom_5fmalloc',['prom_malloc',['../prom__alloc_8h.html#ae1613c091e07daa2bfa4303ef5628827',1,'prom_alloc.h']]], 5 | ['prom_5frealloc',['prom_realloc',['../prom__alloc_8h.html#aab8dc4629c851a8c59cc721bd2f7c6f3',1,'prom_alloc.h']]], 6 | ['prom_5fstrdup',['prom_strdup',['../prom__alloc_8h.html#a21faa2fafc84c8ca25467fe9cb0a55f3',1,'prom_alloc.h']]] 7 | ]; 8 | -------------------------------------------------------------------------------- /docs/search/enums_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/enums_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5freturn_5fcode',['prom_return_code',['../prom__errors_8h.html#ae9dcc70f3217ae6f5cd331dbdef06602',1,'prom_errors.h']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/enumvalues_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/enumvalues_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5fcollector_5fregistration_5ffailure',['PROM_COLLECTOR_REGISTRATION_FAILURE',['../prom__errors_8h.html#a3b3873fa7ceb3c9e4a8d714771fb4830a23269fa188cfe85113887765ae300781',1,'prom_errors.h']]], 4 | ['prom_5ffailure',['PROM_FAILURE',['../prom__errors_8h.html#a3b3873fa7ceb3c9e4a8d714771fb4830a20d1dda215f590d375c018ecabb065cc',1,'prom_errors.h']]], 5 | ['prom_5finvalid_5fmetric_5ftype',['PROM_INVALID_METRIC_TYPE',['../prom__errors_8h.html#a3b3873fa7ceb3c9e4a8d714771fb4830a11a15b66987a9d455f369a94101205fc',1,'prom_errors.h']]], 6 | ['prom_5fmetric_5fregistration_5ffailure',['PROM_METRIC_REGISTRATION_FAILURE',['../prom__errors_8h.html#a3b3873fa7ceb3c9e4a8d714771fb4830ae3ad35c6d86de06362db4735e0805416',1,'prom_errors.h']]], 7 | ['prom_5fsuccess',['PROM_SUCCESS',['../prom__errors_8h.html#a3b3873fa7ceb3c9e4a8d714771fb4830a4860821c9dc1ba212354b29a48b8c59c',1,'prom_errors.h']]] 8 | ]; 9 | -------------------------------------------------------------------------------- /docs/search/files_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/files_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_2eh',['prom.h',['../prom_8h.html',1,'']]], 4 | ['prom_5falloc_2eh',['prom_alloc.h',['../prom__alloc_8h.html',1,'']]], 5 | ['prom_5fcollector_2eh',['prom_collector.h',['../prom__collector_8h.html',1,'']]], 6 | ['prom_5fcollector_5fregistry_2eh',['prom_collector_registry.h',['../prom__collector__registry_8h.html',1,'']]], 7 | ['prom_5fcounter_2eh',['prom_counter.h',['../prom__counter_8h.html',1,'']]], 8 | ['prom_5fgauge_2eh',['prom_gauge.h',['../prom__gauge_8h.html',1,'']]], 9 | ['prom_5fhistogram_2eh',['prom_histogram.h',['../prom__histogram_8h.html',1,'']]], 10 | ['prom_5fhistogram_5fbuckets_2eh',['prom_histogram_buckets.h',['../prom__histogram__buckets_8h.html',1,'']]], 11 | ['prom_5fmetric_2eh',['prom_metric.h',['../prom__metric_8h.html',1,'']]], 12 | ['prom_5fmetric_5fsample_2eh',['prom_metric_sample.h',['../prom__metric__sample_8h.html',1,'']]], 13 | ['prom_5fmetric_5fsample_5fhistogram_2eh',['prom_metric_sample_histogram.h',['../prom__metric__sample__histogram_8h.html',1,'']]], 14 | ['promhttp_2eh',['promhttp.h',['../promhttp_8h.html',1,'']]] 15 | ]; 16 | -------------------------------------------------------------------------------- /docs/search/functions_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/mag_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/search/mag_sel.png -------------------------------------------------------------------------------- /docs/search/nomatches.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 |
No Matches
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/search/pages_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/pages_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['todo_20list',['Todo List',['../todo.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/pages_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/pages_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['welcome_20to_20the_20documentation_20site_20for_20prometheus_2dclient_2dc_21',['Welcome to the documentation site for prometheus-client-c!',['../index.html',1,'']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/search_l.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/search/search_l.png -------------------------------------------------------------------------------- /docs/search/search_m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/search/search_m.png -------------------------------------------------------------------------------- /docs/search/search_r.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/search/search_r.png -------------------------------------------------------------------------------- /docs/search/searchdata.js: -------------------------------------------------------------------------------- 1 | var indexSectionsWithContent = 2 | { 3 | 0: "cptuw", 4 | 1: "p", 5 | 2: "p", 6 | 3: "p", 7 | 4: "cpu", 8 | 5: "p", 9 | 6: "p", 10 | 7: "tw" 11 | }; 12 | 13 | var indexSectionNames = 14 | { 15 | 0: "all", 16 | 1: "classes", 17 | 2: "files", 18 | 3: "functions", 19 | 4: "variables", 20 | 5: "typedefs", 21 | 6: "defines", 22 | 7: "pages" 23 | }; 24 | 25 | var indexSectionLabels = 26 | { 27 | 0: "All", 28 | 1: "Classes", 29 | 2: "Files", 30 | 3: "Functions", 31 | 4: "Variables", 32 | 5: "Typedefs", 33 | 6: "Macros", 34 | 7: "Pages" 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /docs/search/typedefs_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/typedefs_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5fcollect_5ffn',['prom_collect_fn',['../prom__collector_8h.html#af87330edd48cdb8e1074517e734b1e40',1,'prom_collector.h']]], 4 | ['prom_5fcollector_5fregistry_5ft',['prom_collector_registry_t',['../prom__collector__registry_8h.html#a20f07748401fbbde9efc8a718f9bc202',1,'prom_collector_registry.h']]], 5 | ['prom_5fcollector_5ft',['prom_collector_t',['../prom__collector_8h.html#a28cf36f114f69a96508c044c44716f9c',1,'prom_collector.h']]], 6 | ['prom_5fcounter_5ft',['prom_counter_t',['../prom__counter_8h.html#a814ceed99a1d618334e51f4d0e160606',1,'prom_counter.h']]], 7 | ['prom_5fgauge_5ft',['prom_gauge_t',['../prom__gauge_8h.html#a09417d7e7bab055a48f8e13181d136a5',1,'prom_gauge.h']]], 8 | ['prom_5fhistogram_5ft',['prom_histogram_t',['../prom__histogram_8h.html#a8c061924368d41c161025bf3d3cde9ae',1,'prom_histogram.h']]], 9 | ['prom_5fmetric_5fsample_5fhistogram_5ft',['prom_metric_sample_histogram_t',['../prom__metric__sample__histogram_8h.html#aed3455bc4eec61a3d8f01e6c1af84f9f',1,'prom_metric_sample_histogram.h']]], 10 | ['prom_5fmetric_5fsample_5ft',['prom_metric_sample_t',['../prom__metric__sample_8h.html#a0fb9ff851bf9ee126756ae826a2ce72a',1,'prom_metric_sample.h']]], 11 | ['prom_5fmetric_5ft',['prom_metric_t',['../prom__metric_8h.html#afd1bd014c48955d6c2c36aa8a8cbb889',1,'prom_metric.h']]] 12 | ]; 13 | -------------------------------------------------------------------------------- /docs/search/variables_0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/variables_0.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['count',['count',['../structprom__histogram__buckets.html#a9da20001e02d992cee82a09372061621',1,'prom_histogram_buckets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/search/variables_1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/variables_1.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['prom_5fcollector_5fregistry_5fdefault',['PROM_COLLECTOR_REGISTRY_DEFAULT',['../prom__collector__registry_8h.html#a6092b48e150390c1927da5fe8914981b',1,'prom_collector_registry.h']]], 4 | ['prom_5fhistogram_5fdefault_5fbuckets',['prom_histogram_default_buckets',['../prom__histogram__buckets_8h.html#aa8d61c1abc355eb54173b27cb1b50a5d',1,'prom_histogram_buckets.h']]] 5 | ]; 6 | -------------------------------------------------------------------------------- /docs/search/variables_2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
Loading...
12 |
13 | 16 |
Searching...
17 |
No Matches
18 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/search/variables_2.js: -------------------------------------------------------------------------------- 1 | var searchData= 2 | [ 3 | ['upper_5fbounds',['upper_bounds',['../structprom__histogram__buckets.html#a8abda07c4930e15a3dff8a86e3164344',1,'prom_histogram_buckets']]] 4 | ]; 5 | -------------------------------------------------------------------------------- /docs/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/splitbar.png -------------------------------------------------------------------------------- /docs/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/sync_off.png -------------------------------------------------------------------------------- /docs/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/sync_on.png -------------------------------------------------------------------------------- /docs/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/tab_a.png -------------------------------------------------------------------------------- /docs/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/tab_b.png -------------------------------------------------------------------------------- /docs/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/tab_h.png -------------------------------------------------------------------------------- /docs/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/docs/tab_s.png -------------------------------------------------------------------------------- /example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean 2 | 3 | VERSION = $(shell cat ../VERSION) 4 | 5 | 6 | GCC = /usr/bin/gcc 7 | FLAGS = -g -Wall 8 | DEPS = foo.h bar.h 9 | OBJ = foo.o bar.o main.o 10 | LIBS = /usr/lib/libprom.so /usr/lib/libpromhttp.so 11 | 12 | PROM_DEB_PACKAGE = ../prom/libprom-dev-${VERSION}-Linux.deb 13 | PROM_TGZ_PACKAGE = ../prom/libprom-dev-${VERSION}-Linux.tar.gz 14 | 15 | PROMHTTP_DEB_PACKAGE = ../promhttp/libpromhttp-dev-${VERSION}-Linux.deb 16 | PROMHTTP_TGZ_PACKAGE = ../promhttp/libpromhttp-dev-${VERSION}-Linux.tar.gz 17 | 18 | example: ${OBJ} ${LIBS} 19 | gcc -g -o $@ ${FLAGS} -O1 -pthread ${OBJ} -lprom -lpromhttp -lmicrohttpd 20 | 21 | ${PROM_DEB_PACKAGE}: 22 | cd .. && ./auto build && ./auto package 23 | 24 | ${PROMHTTP_DEB_PACKAGE}: 25 | cd .. && ./auto build && ./auto package 26 | 27 | /usr/lib/libprom.so: ${PROM_DEB_PACKAGE} 28 | dpkg -i ${PROM_DEB_PACKAGE} 29 | 30 | /usr/lib/libpromhttp.so: ${PROMHTTP_DEB_PACKAGE} 31 | dpkg -i ${PROMHTTP_DEB_PACKAGE} 32 | 33 | %.o: %.c ${PROM_DEB_PACKAGE} ${PROMHTTP_DEB_PACKAGE} ${LIBS} ${DEPS} 34 | ${GCC} ${FLAGS} -c $< -o $@ 35 | 36 | clean: 37 | -rm ${OBJ} example ${PROM_DEB_PACKAGE} ${PROM_TGZ_PACKAGE} ${PROMHTTP_DEB_PACKAGE} ${PROMHTTP_TGZ_PACKAGE} 38 | -dpkg -r libprom-dev 39 | -dpkg -r libpromhttp-dev 40 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # Example 2 | 3 | To run this example: 4 | 5 | * Execute `./auto dev` from the root of the project directory to enter the development environment 6 | * Execute `cd example` 7 | * Execute `make` 8 | * This process will build a binary called example in the current working directory. Execute `./example` to execute the 9 | example. 10 | * In another shell, execute `curl http://0.0.0.0:8000/metrics` -------------------------------------------------------------------------------- /example/bar.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom.h" 18 | 19 | prom_counter_t *bar_counter; 20 | prom_gauge_t *bar_gauge; 21 | 22 | int bar(int v, const char *label) { 23 | int r = 0; 24 | r = prom_counter_inc(bar_counter, NULL); 25 | if (r) return r; 26 | return prom_gauge_add(bar_gauge, v, (const char *[]) { label }); 27 | } 28 | 29 | void bar_init(void) { 30 | bar_counter = prom_collector_registry_must_register_metric(prom_counter_new("bar_counter", "counter for bar", 0, NULL)); 31 | bar_gauge = prom_collector_registry_must_register_metric(prom_gauge_new("bar_gauge", "gauge for bar", 1, (const char *[]) { "label" })); 32 | } -------------------------------------------------------------------------------- /example/bar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | int bar(int v, const char *label); 18 | void bar_init(void); -------------------------------------------------------------------------------- /example/foo.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include "prom.h" 19 | 20 | prom_counter_t *foo_counter; 21 | prom_gauge_t *foo_gauge; 22 | 23 | int foo(int v, const char *label) { 24 | int r = 0; 25 | r = prom_counter_inc(foo_counter, NULL); 26 | if (r) return r; 27 | return prom_gauge_add(foo_gauge, v, (const char *[]) { label }); 28 | } 29 | 30 | void foo_init(void) { 31 | foo_counter = prom_collector_registry_must_register_metric(prom_counter_new("foo_counter", "counter for foo", 0, NULL)); 32 | foo_gauge = prom_collector_registry_must_register_metric(prom_gauge_new("foo_gauge", "gauge for foo", 1, (const char *[]) { "label" })); 33 | } -------------------------------------------------------------------------------- /example/foo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | int foo(int v, const char *label); 19 | void foo_init(void); -------------------------------------------------------------------------------- /prom/include/prom_alloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-2020 DigitalOcean Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file prom_alloc.h 19 | * @brief memory management 20 | */ 21 | 22 | #ifndef PROM_ALLOC_H 23 | #define PROM_ALLOC_H 24 | 25 | #include 26 | #include 27 | 28 | /** 29 | * @brief Redefine this macro if you wish to override it. The default value is malloc. 30 | */ 31 | #define prom_malloc malloc 32 | 33 | /** 34 | * @brief Redefine this macro if you wish to override it. The default value is realloc. 35 | */ 36 | #define prom_realloc realloc 37 | 38 | /** 39 | * @brief Redefine this macro if you wish to override it. The default value is strdup. 40 | */ 41 | #define prom_strdup strdup 42 | 43 | /** 44 | * @brief Redefine this macro if you wish to override it. The default value is free. 45 | */ 46 | #define prom_free free 47 | 48 | #endif // PROM_ALLOC_H 49 | -------------------------------------------------------------------------------- /prom/include/prom_linked_list.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-2020 DigitalOcean Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_LIST_H 18 | #define PROM_LIST_H 19 | 20 | #include 21 | 22 | struct prom_linked_list; 23 | /** 24 | * @brief Provides a generic linked list 25 | */ 26 | typedef struct prom_linked_list prom_linked_list_t; 27 | 28 | #endif // PROM_LIST_H 29 | -------------------------------------------------------------------------------- /prom/include/prom_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-2020 DigitalOcean Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_MAP_H 18 | #define PROM_MAP_H 19 | 20 | struct prom_map; 21 | typedef struct prom_map prom_map_t; 22 | 23 | struct prom_map_node; 24 | typedef struct prom_map_node prom_map_node_t; 25 | 26 | #endif // PROM_MAP_H 27 | -------------------------------------------------------------------------------- /prom/include/prom_metric_sample_histogram.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2019-2020 DigitalOcean Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /** 18 | * @file prom_metric_sample_histogram.h 19 | * @brief Functions for interacting with histogram metric samples directly 20 | */ 21 | 22 | #ifndef PROM_METRIC_SAMPLE_HISOTGRAM_H 23 | #define PROM_METRIC_SAMPLE_HISOTGRAM_H 24 | 25 | struct prom_metric_sample_histogram; 26 | /** 27 | * @brief A histogram metric sample 28 | */ 29 | typedef struct prom_metric_sample_histogram prom_metric_sample_histogram_t; 30 | 31 | /** 32 | * @brief Observe the double for the given prom_metric_sample_histogram_observe_t 33 | * @param self The target prom_metric_sample_histogram_t* 34 | * @param value The value to observe. 35 | * @return Non-zero integer value upon failure 36 | */ 37 | int prom_metric_sample_histogram_observe(prom_metric_sample_histogram_t *self, double value); 38 | 39 | #endif // PROM_METRIC_SAMPLE_HISOTGRAM_H 40 | -------------------------------------------------------------------------------- /prom/src/prom_assert.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #ifndef PROM_ASSERT_H 20 | #define PROM_ASSERT_H 21 | 22 | #ifdef PROM_ASSERT_ENABLE 23 | #define PROM_ASSERT(i) assert(i); 24 | #else 25 | #define PROM_ASSERT(i) 26 | #endif // PROM_TEST 27 | 28 | #endif // PROM_ASSERT_H 29 | -------------------------------------------------------------------------------- /prom/src/prom_collector_registry_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_collector_registry_t.h" 18 | 19 | #ifndef PROM_COLLECTOR_REGISTRY_I_INCLUDED 20 | #define PROM_COLLECTOR_REGISTRY_I_INCLUDED 21 | 22 | int prom_collector_registry_enable_custom_process_metrics(prom_collector_registry_t *self, 23 | const char *process_limits_path, 24 | const char *process_stats_path); 25 | 26 | #endif // PROM_COLLECTOR_REGISTRY_I_INCLUDED 27 | -------------------------------------------------------------------------------- /prom/src/prom_collector_registry_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_REGISTRY_T_H 18 | #define PROM_REGISTRY_T_H 19 | 20 | #include 21 | #include 22 | 23 | // Public 24 | #include "prom_collector_registry.h" 25 | 26 | // Private 27 | #include "prom_map_t.h" 28 | #include "prom_metric_formatter_t.h" 29 | #include "prom_string_builder_t.h" 30 | 31 | struct prom_collector_registry { 32 | const char *name; 33 | bool disable_process_metrics; /**< Disables the collection of process metrics */ 34 | prom_map_t *collectors; /**< Map of collectors keyed by name */ 35 | prom_string_builder_t *string_builder; /**< Enables string building */ 36 | prom_metric_formatter_t *metric_formatter; /**< metric formatter for metric exposition on bridge call */ 37 | pthread_rwlock_t *lock; /**< mutex for safety against concurrent registration */ 38 | }; 39 | 40 | #endif // PROM_REGISTRY_T_H 41 | -------------------------------------------------------------------------------- /prom/src/prom_collector_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_COLLECTOR_T_H 18 | #define PROM_COLLECTOR_T_H 19 | 20 | #include "prom_collector.h" 21 | #include "prom_map_t.h" 22 | #include "prom_string_builder_t.h" 23 | 24 | struct prom_collector { 25 | const char *name; 26 | prom_map_t *metrics; 27 | prom_collect_fn *collect_fn; 28 | prom_string_builder_t *string_builder; 29 | const char *proc_limits_file_path; 30 | const char *proc_stat_file_path; 31 | }; 32 | 33 | #endif // PROM_COLLECTOR_T_H 34 | -------------------------------------------------------------------------------- /prom/src/prom_errors.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define PROM_STDIO_CLOSE_DIR_ERROR "failed to close dir" 18 | #define PROM_STDIO_OPEN_DIR_ERROR "failed to open dir" 19 | #define PROM_METRIC_INCORRECT_TYPE "incorrect metric type" 20 | #define PROM_METRIC_INVALID_LABEL_NAME "invalid label name" 21 | #define PROM_PTHREAD_RWLOCK_DESTROY_ERROR "failed to destroy the pthread_rwlock_t*" 22 | #define PROM_PTHREAD_RWLOCK_INIT_ERROR "failed to initialize the pthread_rwlock_t*" 23 | #define PROM_PTHREAD_RWLOCK_LOCK_ERROR "failed to lock the pthread_rwlock_t*" 24 | #define PROM_PTHREAD_RWLOCK_UNLOCK_ERROR "failed to unlock the pthread_rwlock_t*" 25 | #define PROM_REGEX_REGCOMP_ERROR "failed to compile the regular expression" 26 | #define PROM_REGEX_REGEXEC_ERROR "failed to execute the regular expression" 27 | -------------------------------------------------------------------------------- /prom/src/prom_log.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #ifndef PROM_LOG_H 20 | #define PROM_LOG_H 21 | 22 | #ifdef PROM_LOG_ENABLE 23 | #define PROM_LOG(msg) printf("%s %s %s %s %d %s\n", __DATE__, __TIME__, __FILE__, __FUNCTION__, __LINE__, msg); 24 | #else 25 | #define PROM_LOG(msg) 26 | #endif // PROM_LOG_ENABLE 27 | 28 | #endif // PROM_LOG_H 29 | -------------------------------------------------------------------------------- /prom/src/prom_map_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_MAP_I_INCLUDED 18 | #define PROM_MAP_I_INCLUDED 19 | 20 | #include "prom_map_t.h" 21 | 22 | prom_map_t *prom_map_new(void); 23 | 24 | int prom_map_set_free_value_fn(prom_map_t *self, prom_map_node_free_value_fn free_value_fn); 25 | 26 | void *prom_map_get(prom_map_t *self, const char *key); 27 | 28 | int prom_map_set(prom_map_t *self, const char *key, void *value); 29 | 30 | int prom_map_delete(prom_map_t *self, const char *key); 31 | 32 | int prom_map_destroy(prom_map_t *self); 33 | 34 | size_t prom_map_size(prom_map_t *self); 35 | 36 | prom_map_node_t *prom_map_node_new(const char *key, void *value, prom_map_node_free_value_fn free_value_fn); 37 | 38 | #endif // PROM_MAP_I_INCLUDED 39 | -------------------------------------------------------------------------------- /prom/src/prom_map_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_MAP_T_H 18 | #define PROM_MAP_T_H 19 | 20 | #include 21 | 22 | // Public 23 | #include "prom_map.h" 24 | 25 | // Private 26 | #include "prom_linked_list_t.h" 27 | 28 | typedef void (*prom_map_node_free_value_fn)(void *); 29 | 30 | struct prom_map_node { 31 | const char *key; 32 | void *value; 33 | prom_map_node_free_value_fn free_value_fn; 34 | }; 35 | 36 | struct prom_map { 37 | size_t size; /**< contains the size of the map */ 38 | size_t max_size; /**< stores the current max_size */ 39 | prom_linked_list_t *keys; /**< linked list containing containing all keys present */ 40 | prom_linked_list_t **addrs; /**< Sequence of linked lists. Each list contains nodes with the same index */ 41 | pthread_rwlock_t *rwlock; 42 | prom_map_node_free_value_fn free_value_fn; 43 | }; 44 | 45 | #endif // PROM_MAP_T_H 46 | -------------------------------------------------------------------------------- /prom/src/prom_metric_formatter_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_METRIC_FORMATTER_T_H 18 | #define PROM_METRIC_FORMATTER_T_H 19 | 20 | #include "prom_string_builder_t.h" 21 | 22 | typedef struct prom_metric_formatter { 23 | prom_string_builder_t *string_builder; 24 | prom_string_builder_t *err_builder; 25 | } prom_metric_formatter_t; 26 | 27 | #endif // PROM_METRIC_FORMATTER_T_H 28 | -------------------------------------------------------------------------------- /prom/src/prom_metric_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | // Private 18 | #include "prom_metric_sample_histogram_t.h" 19 | #include "prom_metric_t.h" 20 | 21 | #ifndef PROM_METRIC_I_INCLUDED 22 | #define PROM_METRIC_I_INCLUDED 23 | 24 | /** 25 | * @brief API PRIVATE Returns a *prom_metric 26 | */ 27 | prom_metric_t *prom_metric_new(prom_metric_type_t type, const char *name, const char *help, size_t label_key_count, 28 | const char **label_keys); 29 | 30 | /** 31 | * @brief API PRIVATE Destroys a *prom_metric 32 | */ 33 | int prom_metric_destroy(prom_metric_t *self); 34 | 35 | /** 36 | * @brief API PRIVATE takes a generic item, casts to a *prom_metric_t and destroys it 37 | */ 38 | int prom_metric_destroy_generic(void *item); 39 | 40 | /** 41 | * @brief API Private takes a generic item, casts to a *prom_metric_t and destroys it. Discards any errors. 42 | */ 43 | void prom_metric_free_generic(void *item); 44 | 45 | #endif // PROM_METRIC_I_INCLUDED 46 | -------------------------------------------------------------------------------- /prom/src/prom_metric_sample_histogram_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | // Public 20 | #include "prom_histogram_buckets.h" 21 | #include "prom_metric_sample_histogram.h" 22 | 23 | // Private 24 | #include "prom_map_t.h" 25 | #include "prom_metric_formatter_t.h" 26 | 27 | #ifndef PROM_METRIC_HISTOGRAM_SAMPLE_T_H 28 | #define PROM_METRIC_HISTOGRAM_SAMPLE_T_H 29 | 30 | struct prom_metric_sample_histogram { 31 | prom_linked_list_t *l_value_list; 32 | prom_map_t *l_values; 33 | prom_map_t *samples; 34 | prom_metric_formatter_t *metric_formatter; 35 | prom_histogram_buckets_t *buckets; 36 | pthread_rwlock_t *rwlock; 37 | }; 38 | 39 | #endif // PROM_METRIC_HISTOGRAM_SAMPLE_T_H 40 | -------------------------------------------------------------------------------- /prom/src/prom_metric_sample_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_metric_sample_t.h" 18 | #include "prom_metric_t.h" 19 | 20 | #ifndef PROM_METRIC_SAMPLE_I_H 21 | #define PROM_METRIC_SAMPLE_I_H 22 | 23 | /** 24 | * @brief API PRIVATE Return a prom_metric_sample_t* 25 | * 26 | * @param type The type of metric sample 27 | * @param l_value The entire left value of the metric e.g metric_name{foo="bar"} 28 | * @param r_value A double representing the value of the sample 29 | */ 30 | prom_metric_sample_t *prom_metric_sample_new(prom_metric_type_t type, const char *l_value, double r_value); 31 | 32 | /** 33 | * @brief API PRIVATE Destroy the prom_metric_sample** 34 | */ 35 | int prom_metric_sample_destroy(prom_metric_sample_t *self); 36 | 37 | /** 38 | * @brief API PRIVATE A prom_linked_list_free_item_fn to enable item destruction within a linked list's destructor 39 | */ 40 | int prom_metric_sample_destroy_generic(void *); 41 | 42 | /** 43 | * @brief API PRIVATE A prom_linked_list_free_item_fn to enable item destruction within a linked list's destructor. 44 | * 45 | * This function ignores any errors. 46 | */ 47 | void prom_metric_sample_free_generic(void *gen); 48 | 49 | #endif // PROM_METRIC_SAMPLE_I_H 50 | -------------------------------------------------------------------------------- /prom/src/prom_metric_sample_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_METRIC_SAMPLE_T_H 18 | #define PROM_METRIC_SAMPLE_T_H 19 | 20 | #include "prom_metric_sample.h" 21 | #include "prom_metric_t.h" 22 | 23 | struct prom_metric_sample { 24 | prom_metric_type_t type; /**< type is the metric type for the sample */ 25 | char *l_value; /**< l_value is the full metric name and label set represeted as a string */ 26 | _Atomic double r_value; /**< r_value is the value of the metric sample */ 27 | }; 28 | 29 | #endif // PROM_METRIC_SAMPLE_T_H 30 | -------------------------------------------------------------------------------- /prom/src/prom_process_fds_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_PROESS_FDS_I_INCLUDED 18 | #define PROM_PROESS_FDS_I_INCLUDED 19 | 20 | int prom_process_fds_count(const char *path); 21 | int prom_process_fds_init(void); 22 | 23 | #endif // PROM_PROESS_FDS_I_INCLUDED 24 | -------------------------------------------------------------------------------- /prom/src/prom_process_fds_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_gauge.h" 18 | 19 | #ifndef PROM_PROESS_FDS_T_H 20 | #define PROM_PROESS_FDS_T_H 21 | 22 | extern prom_gauge_t *prom_process_open_fds; 23 | 24 | #endif // PROM_PROESS_FDS_T_H 25 | -------------------------------------------------------------------------------- /prom/src/prom_process_limits_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_PROCESS_T_H 18 | #define PROM_PROCESS_T_H 19 | 20 | #include "prom_gauge.h" 21 | #include "prom_procfs_t.h" 22 | 23 | extern prom_gauge_t *prom_process_open_fds; 24 | extern prom_gauge_t *prom_process_max_fds; 25 | extern prom_gauge_t *prom_process_virtual_memory_max_bytes; 26 | 27 | typedef struct prom_process_limits_row { 28 | const char *limit; /**< Pointer to a string */ 29 | int soft; /**< Soft value */ 30 | int hard; /**< Hard value */ 31 | const char *units; /**< Units */ 32 | } prom_process_limits_row_t; 33 | 34 | typedef struct prom_process_limits_current_row { 35 | char *limit; /**< Pointer to a string */ 36 | int soft; /**< Soft value */ 37 | int hard; /**< Hard value */ 38 | char *units; /**< Units */ 39 | } prom_process_limits_current_row_t; 40 | 41 | typedef prom_procfs_buf_t prom_process_limits_file_t; 42 | 43 | #endif // PROM_PROCESS_T_H 44 | -------------------------------------------------------------------------------- /prom/src/prom_process_stat_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_PROCESS_STATS_I_H 18 | #define PROM_PROCESS_STATS_I_H 19 | 20 | #include "prom_process_stat_t.h" 21 | 22 | prom_process_stat_file_t *prom_process_stat_file_new(const char *path); 23 | int prom_process_stat_file_destroy(prom_process_stat_file_t *self); 24 | prom_process_stat_t *prom_process_stat_new(prom_process_stat_file_t *stat_f); 25 | int prom_process_stat_destroy(prom_process_stat_t *self); 26 | int prom_process_stats_init(void); 27 | 28 | #endif // PROM_PROCESS_STATS_I_H 29 | -------------------------------------------------------------------------------- /prom/src/prom_procfs_i.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_PROCFS_I_H 18 | #define PROM_PROCFS_I_H 19 | 20 | #include "prom_procfs_t.h" 21 | 22 | prom_procfs_buf_t *prom_procfs_buf_new(const char *path); 23 | 24 | int prom_procfs_buf_destroy(prom_procfs_buf_t *self); 25 | 26 | #endif // PROM_PROCFS_I_H 27 | -------------------------------------------------------------------------------- /prom/src/prom_procfs_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_PROCFS_T_H 18 | #define PROM_PROCFS_T_H 19 | 20 | typedef struct prom_procfs_buf { 21 | size_t allocated; 22 | size_t size; 23 | size_t index; 24 | char *buf; 25 | } prom_procfs_buf_t; 26 | 27 | #endif // PROM_PROCFS_T_H 28 | -------------------------------------------------------------------------------- /prom/src/prom_string_builder_t.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef PROM_STRING_BUILDER_T_H 18 | #define PROM_STRING_BUILDER_T_H 19 | 20 | struct prom_string_builder; 21 | /** 22 | * @brief API PRIVATE A structure with functions responsible for building a string 23 | */ 24 | typedef struct prom_string_builder prom_string_builder_t; 25 | 26 | #endif // PROM_STRING_BUILDER_T_H 27 | -------------------------------------------------------------------------------- /prom/test/fixtures/limits: -------------------------------------------------------------------------------- 1 | Limit Soft Limit Hard Limit Units 2 | Max cpu time unlimited unlimited seconds 3 | Max file size unlimited unlimited bytes 4 | Max data size unlimited unlimited bytes 5 | Max stack size 8388608 unlimited bytes 6 | Max core file size 0 unlimited bytes 7 | Max resident set unlimited unlimited bytes 8 | Max processes unlimited unlimited processes 9 | Max open files 1048576 1048576 files 10 | Max locked memory 83968000 83968000 bytes 11 | Max address space unlimited unlimited bytes 12 | Max file locks unlimited unlimited locks 13 | Max pending signals 23701 23701 signals 14 | Max msgqueue size 819200 819200 bytes 15 | Max nice priority 0 0 16 | Max realtime priority 0 0 17 | Max realtime timeout unlimited unlimited us -------------------------------------------------------------------------------- /prom/test/fixtures/stat: -------------------------------------------------------------------------------- 1 | 1 (bash) S 0 1 1 34816 410 4210944 1463 89550 0 7 3 4 165 193 20 0 1 0 29414985 19058688 885 18446744073709551615 94298705027072 94298706087992 140736141303504 0 0 0 65536 3670020 1266777851 0 0 0 17 0 0 0 0 0 0 94298708188560 94298708235620 94298741563392 140736141311847 140736141311857 140736141311857 140736141311982 0 -------------------------------------------------------------------------------- /prom/test/prom_collector_test.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_test_helpers.h" 18 | 19 | void test_prom_collector(void) { 20 | prom_collector_t *collector = prom_collector_new("test"); 21 | prom_counter_t *counter = prom_counter_new("test_counter", "counter under test", 0, NULL); 22 | prom_collector_add_metric(collector, counter); 23 | prom_map_t *m = collector->collect_fn(collector); 24 | TEST_ASSERT_EQUAL_INT(1, prom_map_size(m)); 25 | prom_collector_destroy(collector); 26 | collector = NULL; 27 | } 28 | 29 | void test_prom_process_collector(void) { 30 | prom_collector_t *collector = 31 | prom_collector_process_new("/code/prom/test/fixtures/limits", "/code/prom/test/fixtures/stat"); 32 | prom_map_t *m = collector->collect_fn(collector); 33 | TEST_ASSERT_EQUAL_INT(7, prom_map_size(m)); 34 | prom_collector_destroy(collector); 35 | collector = NULL; 36 | } 37 | 38 | int main(int argc, const char **argv) { 39 | UNITY_BEGIN(); 40 | RUN_TEST(test_prom_collector); 41 | RUN_TEST(test_prom_process_collector); 42 | return UNITY_END(); 43 | } 44 | -------------------------------------------------------------------------------- /prom/test/prom_procfs_test.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_test_helpers.h" 18 | 19 | void test_prom_procfs_buf(void) { 20 | prom_procfs_buf_t *buf = prom_procfs_buf_new("/proc/1/limits"); 21 | TEST_ASSERT_NOT_NULL(buf); 22 | TEST_ASSERT_NOT_NULL(strstr(buf->buf, "Max realtime timeout")); 23 | prom_procfs_buf_destroy(buf); 24 | buf = NULL; 25 | } 26 | 27 | int main(int argc, const char **argv) { 28 | UNITY_BEGIN(); 29 | RUN_TEST(test_prom_procfs_buf); 30 | return UNITY_END(); 31 | } 32 | -------------------------------------------------------------------------------- /prom/test/prom_test_helpers.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom_test_helpers.h" 18 | -------------------------------------------------------------------------------- /prom/test/prom_test_helpers.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include 5 | 6 | #include "prom.h" 7 | #include "prom_collector_registry_t.h" 8 | #include "prom_collector_t.h" 9 | #include "prom_linked_list_i.h" 10 | #include "prom_linked_list_t.h" 11 | #include "prom_map_i.h" 12 | #include "prom_map_t.h" 13 | #include "prom_metric_formatter_i.h" 14 | #include "prom_metric_formatter_t.h" 15 | #include "prom_metric_i.h" 16 | #include "prom_metric_sample_histogram_i.h" 17 | #include "prom_metric_sample_histogram_t.h" 18 | #include "prom_metric_sample_i.h" 19 | #include "prom_metric_sample_t.h" 20 | #include "prom_metric_t.h" 21 | #include "prom_process_fds_i.h" 22 | #include "prom_process_fds_t.h" 23 | #include "prom_process_limits_i.h" 24 | #include "prom_process_limits_t.h" 25 | #include "prom_process_stat_i.h" 26 | #include "prom_process_stat_t.h" 27 | #include "prom_procfs_i.h" 28 | #include "prom_procfs_t.h" 29 | #include "prom_string_builder_i.h" 30 | #include "prom_string_builder_t.h" 31 | #include "unity.h" 32 | -------------------------------------------------------------------------------- /promtest/test/promtest.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "promtest_counter.h" 18 | #include "promtest_gauge.h" 19 | #include "promtest_histogram.h" 20 | #include "promtest_helpers.h" 21 | #include "unity.h" 22 | 23 | int main(int argc, const char **argv) { 24 | UNITY_BEGIN(); 25 | RUN_TEST(promtest_counter); 26 | RUN_TEST(promtest_gauge); 27 | RUN_TEST(promtest_histogram); 28 | return UNITY_END(); 29 | } 30 | -------------------------------------------------------------------------------- /promtest/test/promtest_counter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom.h" 18 | 19 | #ifndef PROMTEST_COUNTER_H 20 | #define PROMTEST_COUNTER_H 21 | 22 | extern prom_counter_t *foo_counter; 23 | 24 | int promtest_counter_setup(void); 25 | int promtest_counter_teardown(void); 26 | 27 | void promtest_counter(void); 28 | 29 | #endif // PROMTEST_COUNTER_H 30 | -------------------------------------------------------------------------------- /promtest/test/promtest_gauge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom.h" 18 | 19 | #ifndef PROMTEST_GAUGE_H 20 | #define PROMTEST_GAUGE_H 21 | 22 | extern prom_gauge_t *foo_gauge; 23 | 24 | int promtest_gauge_setup(void); 25 | int promtest_gauge_teardown(void); 26 | 27 | void promtest_gauge(void); 28 | 29 | #endif // PROMTEST_GAUGE_H 30 | -------------------------------------------------------------------------------- /promtest/test/promtest_helpers.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | 19 | #ifndef PROMTTEST_HELPERS_H 20 | #define PROMTTEST_HELPERS_H 21 | 22 | #define PROMTEST_THREAD_POOL_SIZE 5 23 | 24 | extern struct MHD_Daemon *promtest_daemon; 25 | 26 | typedef struct promtest_popen_buf { 27 | char *buf; 28 | int size; 29 | int allocated; 30 | FILE *f; 31 | } promtest_popen_buf_t; 32 | 33 | promtest_popen_buf_t *promtest_popen_buf_new(FILE *f); 34 | int promtest_popen_buf_destroy(promtest_popen_buf_t *self); 35 | int promtest_popen_buf_read(promtest_popen_buf_t *self); 36 | int promtest_popen_buf_ensure_space(promtest_popen_buf_t *self); 37 | 38 | #endif // PROMTEST_HELPERS_H 39 | -------------------------------------------------------------------------------- /promtest/test/promtest_histogram.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2019-2020 DigitalOcean Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include "prom.h" 18 | 19 | #ifndef PROMTEST_HISTOGRAM_H 20 | #define PROMTEST_HISTOGRAM_H 21 | 22 | extern prom_histogram_t *foo_histogram; 23 | 24 | int promtest_histogram_setup(void); 25 | int promtest_histogram_teardown(void); 26 | 27 | void promtest_histogram(void); 28 | 29 | #endif // PROMTEST_HISTOGRAM_H 30 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | # These files are text and should be normalized (convert crlf to lf) 4 | *.rb text 5 | *.test text 6 | *.c text 7 | *.cpp text 8 | *.h text 9 | *.txt text 10 | *.yml text 11 | *.s79 text 12 | *.bat text 13 | *.xcl text 14 | *.inc text 15 | *.info text 16 | *.md text 17 | makefile text 18 | rakefile text 19 | 20 | 21 | #These files are binary and should not be normalized 22 | *.doc binary 23 | *.odt binary 24 | *.pdf binary 25 | *.ewd binary 26 | *.eww binary 27 | *.dni binary 28 | *.wsdt binary 29 | *.dbgdt binary 30 | *.mac binary 31 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | test/sandbox 3 | .DS_Store 4 | examples/example_1/test1.exe 5 | examples/example_1/test2.exe 6 | examples/example_2/all_tests.exe 7 | examples/example_1/test1.out 8 | examples/example_1/test2.out 9 | examples/example_2/all_tests.out 10 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | matrix: 4 | include: 5 | - os: osx 6 | compiler: clang 7 | osx_image: xcode7.3 8 | - os: linux 9 | dist: trusty 10 | compiler: gcc 11 | 12 | before_install: 13 | - if [ "$TRAVIS_OS_NAME" == "osx" ]; then rvm install 2.1 && rvm use 2.1 && ruby -v; fi 14 | - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install --assume-yes --quiet gcc-multilib; fi 15 | install: 16 | - gem install rspec 17 | - gem install rubocop 18 | script: 19 | - cd test && rake ci 20 | - make -s 21 | - make -s DEBUG=-m32 #32-bit architecture with 64-bit support 22 | - make -s DEBUG=-m32 UNITY_SUPPORT_64= #32-bit build without 64-bit types 23 | - make -s UNITY_INCLUDE_DOUBLE= # without double 24 | - cd ../extras/fixture/test && rake ci 25 | - make -s default noStdlibMalloc 26 | - make -s C89 27 | - cd ../../../examples/example_1 && make -s ci 28 | - cd ../example_2 && make -s ci 29 | - cd ../example_3 && rake 30 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/auto/colour_reporter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require "#{File.expand_path(File.dirname(__FILE__))}/colour_prompt" 8 | 9 | $colour_output = true 10 | 11 | def report(message) 12 | if !$colour_output 13 | $stdout.puts(message) 14 | else 15 | message = message.join('\n') if message.class == Array 16 | message.each_line do |line| 17 | line.chomp! 18 | colour = case line 19 | when /(?:total\s+)?tests:?\s+(\d+)\s+(?:total\s+)?failures:?\s+\d+\s+Ignored:?/i 20 | Regexp.last_match(1).to_i.zero? ? :green : :red 21 | when /PASS/ 22 | :green 23 | when /^OK$/ 24 | :green 25 | when /(?:FAIL|ERROR)/ 26 | :red 27 | when /IGNORE/ 28 | :yellow 29 | when /^(?:Creating|Compiling|Linking)/ 30 | :white 31 | else 32 | :silver 33 | end 34 | colour_puts(colour, line) 35 | end 36 | end 37 | $stdout.flush 38 | $stderr.flush 39 | end 40 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/auto/generate_config.yml: -------------------------------------------------------------------------------- 1 | #this is a sample configuration file for generate_module 2 | #you would use it by calling generate_module with the -ygenerate_config.yml option 3 | #files like this are useful for customizing generate_module to your environment 4 | :generate_module: 5 | :defaults: 6 | #these defaults are used in place of any missing options at the command line 7 | :path_src: ../src/ 8 | :path_inc: ../src/ 9 | :path_tst: ../test/ 10 | :update_svn: true 11 | :includes: 12 | #use [] for no additional includes, otherwise list the includes on separate lines 13 | :src: 14 | - Defs.h 15 | - Board.h 16 | :inc: [] 17 | :tst: 18 | - Defs.h 19 | - Board.h 20 | - Exception.h 21 | :boilerplates: 22 | #these are inserted at the top of generated files. 23 | #just comment out or remove if not desired. 24 | #use %1$s where you would like the file name to appear (path/extension not included) 25 | :src: | 26 | //------------------------------------------- 27 | // %1$s.c 28 | //------------------------------------------- 29 | :inc: | 30 | //------------------------------------------- 31 | // %1$s.h 32 | //------------------------------------------- 33 | :tst: | 34 | //------------------------------------------- 35 | // Test%1$s.c : Units tests for %1$s.c 36 | //------------------------------------------- 37 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/auto/test_file_filter.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | require'yaml' 8 | 9 | module RakefileHelpers 10 | class TestFileFilter 11 | def initialize(all_files = false) 12 | @all_files = all_files 13 | 14 | return false unless @all_files 15 | return false unless File.exist?('test_file_filter.yml') 16 | 17 | filters = YAML.load_file('test_file_filter.yml') 18 | @all_files = filters[:all_files] 19 | @only_files = filters[:only_files] 20 | @exclude_files = filters[:exclude_files] 21 | end 22 | 23 | attr_accessor :all_files, :only_files, :exclude_files 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/auto/type_sanitizer.rb: -------------------------------------------------------------------------------- 1 | module TypeSanitizer 2 | def self.sanitize_c_identifier(unsanitized) 3 | # convert filename to valid C identifier by replacing invalid chars with '_' 4 | unsanitized.gsub(/[-\/\\\.\,\s]/, '_') 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/vendor/Unity-2.4.3/docs/UnityAssertionsCheatSheetSuitableforPrintingandPossiblyFraming.pdf -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/docs/license.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2007-14 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/readme.txt: -------------------------------------------------------------------------------- 1 | Example 1 2 | ========= 3 | 4 | Close to the simplest possible example of Unity, using only basic features. 5 | Run make to build & run the example tests. -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/src/ProductionCode.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode.h" 3 | 4 | int Counter = 0; 5 | int NumbersToFind[9] = { 0, 34, 55, 66, 32, 11, 1, 77, 888 }; /* some obnoxious array to search that is 1-based indexing instead of 0. */ 6 | 7 | /* This function is supposed to search through NumbersToFind and find a particular number. 8 | * If it finds it, the index is returned. Otherwise 0 is returned which sorta makes sense since 9 | * NumbersToFind is indexed from 1. Unfortunately it's broken 10 | * (and should therefore be caught by our tests) */ 11 | int FindFunction_WhichIsBroken(int NumberToFind) 12 | { 13 | int i = 0; 14 | while (i <= 8) /* Notice I should have been in braces */ 15 | i++; 16 | if (NumbersToFind[i] == NumberToFind) /* Yikes! I'm getting run after the loop finishes instead of during it! */ 17 | return i; 18 | return 0; 19 | } 20 | 21 | int FunctionWhichReturnsLocalVariable(void) 22 | { 23 | return Counter; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/src/ProductionCode.h: -------------------------------------------------------------------------------- 1 | 2 | int FindFunction_WhichIsBroken(int NumberToFind); 3 | int FunctionWhichReturnsLocalVariable(void); 4 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/src/ProductionCode2.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode2.h" 3 | 4 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction) 5 | { 6 | (void)Poor; 7 | (void)LittleFunction; 8 | /* Since There Are No Tests Yet, This Function Could Be Empty For All We Know. 9 | * Which isn't terribly useful... but at least we put in a TEST_IGNORE so we won't forget */ 10 | return (char*)0; 11 | } 12 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/src/ProductionCode2.h: -------------------------------------------------------------------------------- 1 | 2 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); 3 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/test/TestProductionCode2.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode2.h" 3 | #include "unity.h" 4 | 5 | /* These should be ignored because they are commented out in various ways: 6 | #include "whatever.h" 7 | #include "somethingelse.h" 8 | */ 9 | 10 | void setUp(void) 11 | { 12 | } 13 | 14 | void tearDown(void) 15 | { 16 | } 17 | 18 | void test_IgnoredTest(void) 19 | { 20 | TEST_IGNORE_MESSAGE("This Test Was Ignored On Purpose"); 21 | } 22 | 23 | void test_AnotherIgnoredTest(void) 24 | { 25 | TEST_IGNORE_MESSAGE("These Can Be Useful For Leaving Yourself Notes On What You Need To Do Yet"); 26 | } 27 | 28 | void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void) 29 | { 30 | TEST_IGNORE(); /* Like This */ 31 | } 32 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_1/test/test_runners/TestProductionCode2_Runner.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | setUp(); \ 12 | TestFunc(); \ 13 | } \ 14 | if (TEST_PROTECT()) \ 15 | { \ 16 | tearDown(); \ 17 | } \ 18 | UnityConcludeTest(); \ 19 | } 20 | 21 | /*=======Automagically Detected Files To Include=====*/ 22 | #include "unity.h" 23 | #include 24 | #include 25 | #include "ProductionCode2.h" 26 | 27 | /*=======External Functions This Runner Calls=====*/ 28 | extern void setUp(void); 29 | extern void tearDown(void); 30 | extern void test_IgnoredTest(void); 31 | extern void test_AnotherIgnoredTest(void); 32 | extern void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void); 33 | 34 | 35 | /*=======Test Reset Option=====*/ 36 | void resetTest(void); 37 | void resetTest(void) 38 | { 39 | tearDown(); 40 | setUp(); 41 | } 42 | 43 | 44 | /*=======MAIN=====*/ 45 | int main(void) 46 | { 47 | UnityBegin("test/TestProductionCode2.c"); 48 | RUN_TEST(test_IgnoredTest, 18); 49 | RUN_TEST(test_AnotherIgnoredTest, 23); 50 | RUN_TEST(test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented, 28); 51 | 52 | return (UnityEnd()); 53 | } 54 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/readme.txt: -------------------------------------------------------------------------------- 1 | Example 2 2 | ========= 3 | 4 | Same as the first example, but now using Unity's test fixture to group tests 5 | together. Using the test fixture also makes writing test runners much easier. -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/src/ProductionCode.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode.h" 3 | 4 | int Counter = 0; 5 | int NumbersToFind[9] = { 0, 34, 55, 66, 32, 11, 1, 77, 888 }; //some obnoxious array to search that is 1-based indexing instead of 0. 6 | 7 | // This function is supposed to search through NumbersToFind and find a particular number. 8 | // If it finds it, the index is returned. Otherwise 0 is returned which sorta makes sense since 9 | // NumbersToFind is indexed from 1. Unfortunately it's broken 10 | // (and should therefore be caught by our tests) 11 | int FindFunction_WhichIsBroken(int NumberToFind) 12 | { 13 | int i = 0; 14 | while (i <= 8) //Notice I should have been in braces 15 | i++; 16 | if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it! 17 | return i; 18 | return 0; 19 | } 20 | 21 | int FunctionWhichReturnsLocalVariable(void) 22 | { 23 | return Counter; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/src/ProductionCode.h: -------------------------------------------------------------------------------- 1 | 2 | int FindFunction_WhichIsBroken(int NumberToFind); 3 | int FunctionWhichReturnsLocalVariable(void); 4 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/src/ProductionCode2.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode2.h" 3 | 4 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction) 5 | { 6 | (void)Poor; 7 | (void)LittleFunction; 8 | //Since There Are No Tests Yet, This Function Could Be Empty For All We Know. 9 | // Which isn't terribly useful... but at least we put in a TEST_IGNORE so we won't forget 10 | return (char*)0; 11 | } 12 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/src/ProductionCode2.h: -------------------------------------------------------------------------------- 1 | 2 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); 3 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/test/TestProductionCode2.c: -------------------------------------------------------------------------------- 1 | #include "ProductionCode2.h" 2 | #include "unity.h" 3 | #include "unity_fixture.h" 4 | 5 | TEST_GROUP(ProductionCode2); 6 | 7 | /* These should be ignored because they are commented out in various ways: 8 | #include "whatever.h" 9 | */ 10 | //#include "somethingelse.h" 11 | 12 | TEST_SETUP(ProductionCode2) 13 | { 14 | } 15 | 16 | TEST_TEAR_DOWN(ProductionCode2) 17 | { 18 | } 19 | 20 | TEST(ProductionCode2, IgnoredTest) 21 | { 22 | TEST_IGNORE_MESSAGE("This Test Was Ignored On Purpose"); 23 | } 24 | 25 | TEST(ProductionCode2, AnotherIgnoredTest) 26 | { 27 | TEST_IGNORE_MESSAGE("These Can Be Useful For Leaving Yourself Notes On What You Need To Do Yet"); 28 | } 29 | 30 | TEST(ProductionCode2, ThisFunctionHasNotBeenTested_NeedsToBeImplemented) 31 | { 32 | TEST_IGNORE(); //Like This 33 | } 34 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/test/test_runners/TestProductionCode2_Runner.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | TEST_GROUP_RUNNER(ProductionCode2) 5 | { 6 | RUN_TEST_CASE(ProductionCode2, IgnoredTest); 7 | RUN_TEST_CASE(ProductionCode2, AnotherIgnoredTest); 8 | RUN_TEST_CASE(ProductionCode2, ThisFunctionHasNotBeenTested_NeedsToBeImplemented); 9 | } -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/test/test_runners/TestProductionCode_Runner.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "unity_fixture.h" 3 | 4 | TEST_GROUP_RUNNER(ProductionCode) 5 | { 6 | RUN_TEST_CASE(ProductionCode, FindFunction_WhichIsBroken_ShouldReturnZeroIfItemIsNotInList_WhichWorksEvenInOurBrokenCode); 7 | RUN_TEST_CASE(ProductionCode, FindFunction_WhichIsBroken_ShouldReturnTheIndexForItemsInList_WhichWillFailBecauseOurFunctionUnderTestIsBroken); 8 | RUN_TEST_CASE(ProductionCode, FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValue); 9 | RUN_TEST_CASE(ProductionCode, FunctionWhichReturnsLocalVariable_ShouldReturnTheCurrentCounterValueAgain); 10 | RUN_TEST_CASE(ProductionCode, FunctionWhichReturnsLocalVariable_ShouldReturnCurrentCounter_ButFailsBecauseThisTestIsActuallyFlawed); 11 | } -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_2/test/test_runners/all_tests.c: -------------------------------------------------------------------------------- 1 | #include "unity_fixture.h" 2 | 3 | static void RunAllTests(void) 4 | { 5 | RUN_TEST_GROUP(ProductionCode); 6 | RUN_TEST_GROUP(ProductionCode2); 7 | } 8 | 9 | int main(int argc, const char * argv[]) 10 | { 11 | return UnityMain(argc, argv, RunAllTests); 12 | } 13 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/helper/UnityHelper.c: -------------------------------------------------------------------------------- 1 | #include "unity.h" 2 | #include "UnityHelper.h" 3 | #include 4 | #include 5 | 6 | void AssertEqualExampleStruct(const EXAMPLE_STRUCT_T expected, const EXAMPLE_STRUCT_T actual, const unsigned short line) 7 | { 8 | UNITY_TEST_ASSERT_EQUAL_INT(expected.x, actual.x, line, "Example Struct Failed For Field x"); 9 | UNITY_TEST_ASSERT_EQUAL_INT(expected.y, actual.y, line, "Example Struct Failed For Field y"); 10 | } 11 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/helper/UnityHelper.h: -------------------------------------------------------------------------------- 1 | #ifndef _TESTHELPER_H 2 | #define _TESTHELPER_H 3 | 4 | #include "Types.h" 5 | 6 | void AssertEqualExampleStruct(const EXAMPLE_STRUCT_T expected, const EXAMPLE_STRUCT_T actual, const unsigned short line); 7 | 8 | #define UNITY_TEST_ASSERT_EQUAL_EXAMPLE_STRUCT_T(expected, actual, line, message) AssertEqualExampleStruct(expected, actual, line); 9 | 10 | #define TEST_ASSERT_EQUAL_EXAMPLE_STRUCT_T(expected, actual) UNITY_TEST_ASSERT_EQUAL_EXAMPLE_STRUCT_T(expected, actual, __LINE__, NULL); 11 | 12 | #endif // _TESTHELPER_H 13 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/rakefile.rb: -------------------------------------------------------------------------------- 1 | HERE = File.expand_path(File.dirname(__FILE__)) + '/' 2 | UNITY_ROOT = File.expand_path(File.dirname(__FILE__)) + '/../..' 3 | 4 | require 'rake' 5 | require 'rake/clean' 6 | require HERE + 'rakefile_helper' 7 | 8 | TEMP_DIRS = [ 9 | File.join(HERE, 'build') 10 | ].freeze 11 | 12 | TEMP_DIRS.each do |dir| 13 | directory(dir) 14 | CLOBBER.include(dir) 15 | end 16 | 17 | task prepare_for_tests: TEMP_DIRS 18 | 19 | include RakefileHelpers 20 | 21 | # Load default configuration, for now 22 | DEFAULT_CONFIG_FILE = 'target_gcc_32.yml'.freeze 23 | configure_toolchain(DEFAULT_CONFIG_FILE) 24 | 25 | task unit: [:prepare_for_tests] do 26 | run_tests unit_test_files 27 | end 28 | 29 | desc 'Generate test summary' 30 | task :summary do 31 | report_summary 32 | end 33 | 34 | desc 'Build and test Unity' 35 | task all: %i(clean unit summary) 36 | task default: %i(clobber all) 37 | task ci: [:default] 38 | task cruise: [:default] 39 | 40 | desc 'Load configuration' 41 | task :config, :config_file do |_t, args| 42 | configure_toolchain(args[:config_file]) 43 | end 44 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/readme.txt: -------------------------------------------------------------------------------- 1 | Example 3 2 | ========= 3 | 4 | This example project gives an example of some passing, ignored, and failing tests. 5 | It's simple and meant for you to look over and get an idea for what all of this stuff does. 6 | 7 | You can build and test using rake. The rake version will let you test with gcc or a couple 8 | versions of IAR. You can tweak the yaml files to get those versions running. 9 | 10 | Ruby is required if you're using the rake version (obviously). This version shows off most of 11 | Unity's advanced features (automatically creating test runners, fancy summaries, etc.) 12 | Without ruby, you have to maintain your own test runners. Do that for a while and you'll learn 13 | why you really want to start using the Ruby tools. 14 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/src/ProductionCode.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode.h" 3 | 4 | int Counter = 0; 5 | int NumbersToFind[9] = { 0, 34, 55, 66, 32, 11, 1, 77, 888 }; //some obnoxious array to search that is 1-based indexing instead of 0. 6 | 7 | // This function is supposed to search through NumbersToFind and find a particular number. 8 | // If it finds it, the index is returned. Otherwise 0 is returned which sorta makes sense since 9 | // NumbersToFind is indexed from 1. Unfortunately it's broken 10 | // (and should therefore be caught by our tests) 11 | int FindFunction_WhichIsBroken(int NumberToFind) 12 | { 13 | int i = 0; 14 | while (i <= 8) //Notice I should have been in braces 15 | i++; 16 | if (NumbersToFind[i] == NumberToFind) //Yikes! I'm getting run after the loop finishes instead of during it! 17 | return i; 18 | return 0; 19 | } 20 | 21 | int FunctionWhichReturnsLocalVariable(void) 22 | { 23 | return Counter; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/src/ProductionCode.h: -------------------------------------------------------------------------------- 1 | 2 | int FindFunction_WhichIsBroken(int NumberToFind); 3 | int FunctionWhichReturnsLocalVariable(void); 4 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/src/ProductionCode2.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode2.h" 3 | 4 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction) 5 | { 6 | (void)Poor; 7 | (void)LittleFunction; 8 | //Since There Are No Tests Yet, This Function Could Be Empty For All We Know. 9 | // Which isn't terribly useful... but at least we put in a TEST_IGNORE so we won't forget 10 | return (char*)0; 11 | } 12 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/src/ProductionCode2.h: -------------------------------------------------------------------------------- 1 | 2 | char* ThisFunctionHasNotBeenTested(int Poor, char* LittleFunction); 3 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/target_gcc_32.yml: -------------------------------------------------------------------------------- 1 | # Copied from ~Unity/targets/gcc_32.yml 2 | unity_root: &unity_root '../..' 3 | compiler: 4 | path: gcc 5 | source_path: 'src/' 6 | unit_tests_path: &unit_tests_path 'test/' 7 | build_path: &build_path 'build/' 8 | options: 9 | - '-c' 10 | - '-m32' 11 | - '-Wall' 12 | - '-Wno-address' 13 | - '-std=c99' 14 | - '-pedantic' 15 | includes: 16 | prefix: '-I' 17 | items: 18 | - 'src/' 19 | - '../../src/' 20 | - *unit_tests_path 21 | defines: 22 | prefix: '-D' 23 | items: 24 | - UNITY_INCLUDE_DOUBLE 25 | - UNITY_SUPPORT_TEST_CASES 26 | object_files: 27 | prefix: '-o' 28 | extension: '.o' 29 | destination: *build_path 30 | linker: 31 | path: gcc 32 | options: 33 | - -lm 34 | - '-m32' 35 | includes: 36 | prefix: '-I' 37 | object_files: 38 | path: *build_path 39 | extension: '.o' 40 | bin_files: 41 | prefix: '-o' 42 | extension: '.exe' 43 | destination: *build_path 44 | colour: true 45 | :unity: 46 | :plugins: [] 47 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/examples/example_3/test/TestProductionCode2.c: -------------------------------------------------------------------------------- 1 | 2 | #include "ProductionCode2.h" 3 | #include "unity.h" 4 | 5 | /* These should be ignored because they are commented out in various ways: 6 | #include "whatever.h" 7 | */ 8 | //#include "somethingelse.h" 9 | 10 | void setUp(void) 11 | { 12 | } 13 | 14 | void tearDown(void) 15 | { 16 | } 17 | 18 | void test_IgnoredTest(void) 19 | { 20 | TEST_IGNORE_MESSAGE("This Test Was Ignored On Purpose"); 21 | } 22 | 23 | void test_AnotherIgnoredTest(void) 24 | { 25 | TEST_IGNORE_MESSAGE("These Can Be Useful For Leaving Yourself Notes On What You Need To Do Yet"); 26 | } 27 | 28 | void test_ThisFunctionHasNotBeenTested_NeedsToBeImplemented(void) 29 | { 30 | TEST_IGNORE(); //Like This 31 | } 32 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/eclipse/error_parsers.txt: -------------------------------------------------------------------------------- 1 | Eclipse error parsers 2 | ===================== 3 | 4 | These are a godsend for extracting & quickly navigating to 5 | warnings & error messages from console output. Unforunately 6 | I don't know how to write an Eclipse plugin so you'll have 7 | to add them manually. 8 | 9 | To add a console parser to Eclipse, go to Window --> Preferences 10 | --> C/C++ --> Build --> Settings. Click on the 'Error Parsers' 11 | tab and then click the 'Add...' button. See the table below for 12 | the parser fields to add. 13 | 14 | Eclipse will only parse the console output during a build, so 15 | running your unit tests must be part of your build process. 16 | Either add this to your make/rakefile, or add it as a post- 17 | build step in your Eclipse project settings. 18 | 19 | 20 | Unity unit test error parsers 21 | ----------------------------- 22 | Severity Pattern File Line Description 23 | ------------------------------------------------------------------------------- 24 | Error (\.+)(.*?):(\d+):(.*?):FAIL: (.*) $2 $3 $5 25 | Warning (\.+)(.*?):(\d+):(.*?):IGNORE: (.*) $2 $3 $5 26 | Warning (\.+)(.*?):(\d+):(.*?):IGNORE\s*$ $2 $3 Ignored test 27 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/rakefile.rb: -------------------------------------------------------------------------------- 1 | # ========================================== 2 | # Unity Project - A Test Framework for C 3 | # Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 4 | # [Released under MIT License. Please refer to license.txt for details] 5 | # ========================================== 6 | 7 | HERE = File.expand_path(File.dirname(__FILE__)) + '/' 8 | 9 | require 'rake' 10 | require 'rake/clean' 11 | require 'rake/testtask' 12 | require HERE + 'rakefile_helper' 13 | 14 | TEMP_DIRS = [ 15 | File.join(HERE, 'build') 16 | ].freeze 17 | 18 | TEMP_DIRS.each do |dir| 19 | directory(dir) 20 | CLOBBER.include(dir) 21 | end 22 | 23 | task prepare_for_tests: TEMP_DIRS 24 | 25 | include RakefileHelpers 26 | 27 | # Load default configuration, for now 28 | DEFAULT_CONFIG_FILE = 'gcc_auto_stdint.yml'.freeze 29 | configure_toolchain(DEFAULT_CONFIG_FILE) 30 | 31 | task unit: [:prepare_for_tests] do 32 | run_tests 33 | end 34 | 35 | desc 'Build and test Unity Framework' 36 | task all: %i(clean unit) 37 | task default: %i(clobber all) 38 | task ci: %i(no_color default) 39 | task cruise: %i(no_color default) 40 | 41 | desc 'Load configuration' 42 | task :config, :config_file do |_t, args| 43 | configure_toolchain(args[:config_file]) 44 | end 45 | 46 | task :no_color do 47 | $colour_output = false 48 | end 49 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/readme.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | 3 | Unity Project - A Test Framework for C 4 | Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | [Released under MIT License. Please refer to license.txt for details] 6 | 7 | This Framework is an optional add-on to Unity. By including unity_framework.h in place of unity.h, 8 | you may now work with Unity in a manner similar to CppUTest. This framework adds the concepts of 9 | test groups and gives finer control of your tests over the command line. -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/src/unity_fixture_internals.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | * ========================================== 3 | * Unity Project - A Test Framework for C 4 | * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | * [Released under MIT License. Please refer to license.txt for details] 6 | * ========================================== */ 7 | 8 | #ifndef UNITY_FIXTURE_INTERNALS_H_ 9 | #define UNITY_FIXTURE_INTERNALS_H_ 10 | 11 | #ifdef __cplusplus 12 | extern "C" 13 | { 14 | #endif 15 | 16 | struct UNITY_FIXTURE_T 17 | { 18 | int Verbose; 19 | unsigned int RepeatCount; 20 | const char* NameFilter; 21 | const char* GroupFilter; 22 | }; 23 | extern struct UNITY_FIXTURE_T UnityFixture; 24 | 25 | typedef void unityfunction(void); 26 | void UnityTestRunner(unityfunction* setup, 27 | unityfunction* body, 28 | unityfunction* teardown, 29 | const char* printableName, 30 | const char* group, 31 | const char* name, 32 | const char* file, unsigned int line); 33 | 34 | void UnityIgnoreTest(const char* printableName, const char* group, const char* name); 35 | void UnityMalloc_StartTest(void); 36 | void UnityMalloc_EndTest(void); 37 | int UnityGetCommandLineOptions(int argc, const char* argv[]); 38 | void UnityConcludeFixtureTest(void); 39 | 40 | void UnityPointer_Set(void** ptr, void* newValue, UNITY_LINE_TYPE line); 41 | void UnityPointer_UndoAllSets(void); 42 | void UnityPointer_Init(void); 43 | #ifndef UNITY_MAX_POINTERS 44 | #define UNITY_MAX_POINTERS 5 45 | #endif 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* UNITY_FIXTURE_INTERNALS_H_ */ 52 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/test/main/AllTests.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | * ========================================== 3 | * Unity Project - A Test Framework for C 4 | * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | * [Released under MIT License. Please refer to license.txt for details] 6 | * ========================================== */ 7 | 8 | #include "unity_fixture.h" 9 | 10 | static void runAllTests(void) 11 | { 12 | RUN_TEST_GROUP(UnityFixture); 13 | RUN_TEST_GROUP(UnityCommandOptions); 14 | RUN_TEST_GROUP(LeakDetection); 15 | RUN_TEST_GROUP(InternalMalloc); 16 | } 17 | 18 | int main(int argc, const char* argv[]) 19 | { 20 | return UnityMain(argc, argv, runAllTests); 21 | } 22 | 23 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/test/template_fixture_tests.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | * ========================================== 3 | * Unity Project - A Test Framework for C 4 | * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | * [Released under MIT License. Please refer to license.txt for details] 6 | * ========================================== */ 7 | 8 | #include "unity_fixture.h" 9 | 10 | static int data = -1; 11 | 12 | TEST_GROUP(mygroup); 13 | 14 | TEST_SETUP(mygroup) 15 | { 16 | data = 0; 17 | } 18 | 19 | TEST_TEAR_DOWN(mygroup) 20 | { 21 | data = -1; 22 | } 23 | 24 | TEST(mygroup, test1) 25 | { 26 | TEST_ASSERT_EQUAL_INT(0, data); 27 | } 28 | 29 | TEST(mygroup, test2) 30 | { 31 | TEST_ASSERT_EQUAL_INT(0, data); 32 | data = 5; 33 | } 34 | 35 | TEST(mygroup, test3) 36 | { 37 | data = 7; 38 | TEST_ASSERT_EQUAL_INT(7, data); 39 | } 40 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/test/unity_output_Spy.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | * ========================================== 3 | * Unity Project - A Test Framework for C 4 | * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | * [Released under MIT License. Please refer to license.txt for details] 6 | * ========================================== */ 7 | 8 | 9 | #include "unity_output_Spy.h" 10 | #include "unity_fixture.h" 11 | 12 | #include 13 | #include 14 | 15 | static int size; 16 | static int count; 17 | static char* buffer; 18 | static int spy_enable; 19 | 20 | void UnityOutputCharSpy_Create(int s) 21 | { 22 | size = (s > 0) ? s : 0; 23 | count = 0; 24 | spy_enable = 0; 25 | buffer = malloc((size_t)size); 26 | TEST_ASSERT_NOT_NULL_MESSAGE(buffer, "Internal malloc failed in Spy Create():" __FILE__); 27 | memset(buffer, 0, (size_t)size); 28 | } 29 | 30 | void UnityOutputCharSpy_Destroy(void) 31 | { 32 | size = 0; 33 | free(buffer); 34 | } 35 | 36 | void UnityOutputCharSpy_OutputChar(int c) 37 | { 38 | if (spy_enable) 39 | { 40 | if (count < (size-1)) 41 | buffer[count++] = (char)c; 42 | } 43 | else 44 | { 45 | putchar(c); 46 | } 47 | } 48 | 49 | const char * UnityOutputCharSpy_Get(void) 50 | { 51 | return buffer; 52 | } 53 | 54 | void UnityOutputCharSpy_Enable(int enable) 55 | { 56 | spy_enable = enable; 57 | } 58 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/extras/fixture/test/unity_output_Spy.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 James Grenning and Contributed to Unity Project 2 | * ========================================== 3 | * Unity Project - A Test Framework for C 4 | * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams 5 | * [Released under MIT License. Please refer to license.txt for details] 6 | * ========================================== */ 7 | 8 | #ifndef D_unity_output_Spy_H 9 | #define D_unity_output_Spy_H 10 | 11 | void UnityOutputCharSpy_Create(int s); 12 | void UnityOutputCharSpy_Destroy(void); 13 | void UnityOutputCharSpy_OutputChar(int c); 14 | const char * UnityOutputCharSpy_Get(void); 15 | void UnityOutputCharSpy_Enable(int enable); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/release/build.info: -------------------------------------------------------------------------------- 1 | 122 2 | 3 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/release/version.info: -------------------------------------------------------------------------------- 1 | 2.4.3 2 | 3 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/.rubocop.yml: -------------------------------------------------------------------------------- 1 | # This is the configuration used to check the rubocop source code. 2 | 3 | #inherit_from: .rubocop_todo.yml 4 | 5 | AllCops: 6 | TargetRubyVersion: 2.1 7 | 8 | # These are areas where ThrowTheSwitch's coding style diverges from the Ruby standard 9 | Style/SpecialGlobalVars: 10 | EnforcedStyle: use_perl_names 11 | Style/FormatString: 12 | Enabled: false 13 | Style/GlobalVars: 14 | Enabled: false 15 | Style/RegexpLiteral: 16 | AllowInnerSlashes: true 17 | Style/HashSyntax: 18 | EnforcedStyle: no_mixed_keys 19 | 20 | # This is disabled because it seems to get confused over nested hashes 21 | Style/AlignHash: 22 | Enabled: false 23 | EnforcedHashRocketStyle: table 24 | EnforcedColonStyle: table 25 | 26 | # We purposefully use these insecure features because they're what makes Ruby awesome 27 | Security/Eval: 28 | Enabled: false 29 | Security/YAMLLoad: 30 | Enabled: false 31 | 32 | # At this point, we're not ready to enforce inline documentation requirements 33 | Style/Documentation: 34 | Enabled: false 35 | Style/DocumentationMethod: 36 | Enabled: false 37 | 38 | # At this point, we're not ready to enforce any metrics 39 | Metrics/AbcSize: 40 | Enabled: false 41 | Metrics/BlockLength: 42 | Enabled: false 43 | Metrics/BlockNesting: 44 | Enabled: false 45 | Metrics/ClassLength: 46 | Enabled: false 47 | Metrics/CyclomaticComplexity: 48 | Enabled: false 49 | Metrics/LineLength: 50 | Enabled: false 51 | Metrics/MethodLength: 52 | Enabled: false 53 | Metrics/ModuleLength: 54 | Enabled: false 55 | Metrics/ParameterLists: 56 | Enabled: false 57 | Metrics/PerceivedComplexity: 58 | Enabled: false 59 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_cmd.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | CEXCEPTION_T e; \ 12 | Try { \ 13 | setUp(); \ 14 | TestFunc(); \ 15 | } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ 16 | } \ 17 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 18 | { \ 19 | tearDown(); \ 20 | } \ 21 | UnityConcludeTest(); \ 22 | } 23 | 24 | /*=======Automagically Detected Files To Include=====*/ 25 | #include "unity.h" 26 | #include 27 | #include 28 | #include "CException.h" 29 | #include "funky.h" 30 | #include "stanky.h" 31 | #include 32 | 33 | /*=======External Functions This Runner Calls=====*/ 34 | extern void setUp(void); 35 | extern void tearDown(void); 36 | extern void test_TheFirstThingToTest(void); 37 | extern void test_TheSecondThingToTest(void); 38 | extern void test_TheThirdThingToTest(void); 39 | extern void test_TheFourthThingToTest(void); 40 | 41 | 42 | /*=======Test Reset Option=====*/ 43 | void resetTest(void); 44 | void resetTest(void) 45 | { 46 | tearDown(); 47 | setUp(); 48 | } 49 | 50 | 51 | /*=======MAIN=====*/ 52 | int main(void) 53 | { 54 | UnityBegin("testdata/testsample.c"); 55 | RUN_TEST(test_TheFirstThingToTest, 21); 56 | RUN_TEST(test_TheSecondThingToTest, 43); 57 | RUN_TEST(test_TheThirdThingToTest, 53); 58 | RUN_TEST(test_TheFourthThingToTest, 58); 59 | 60 | return (UnityEnd()); 61 | } 62 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_def.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | setUp(); \ 12 | TestFunc(); \ 13 | } \ 14 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 15 | { \ 16 | tearDown(); \ 17 | } \ 18 | UnityConcludeTest(); \ 19 | } 20 | 21 | /*=======Automagically Detected Files To Include=====*/ 22 | #include "unity.h" 23 | #include 24 | #include 25 | #include "funky.h" 26 | #include "stanky.h" 27 | #include 28 | 29 | /*=======External Functions This Runner Calls=====*/ 30 | extern void setUp(void); 31 | extern void tearDown(void); 32 | extern void test_TheFirstThingToTest(void); 33 | extern void test_TheSecondThingToTest(void); 34 | extern void test_TheThirdThingToTest(void); 35 | extern void test_TheFourthThingToTest(void); 36 | 37 | 38 | /*=======Test Reset Option=====*/ 39 | void resetTest(void); 40 | void resetTest(void) 41 | { 42 | tearDown(); 43 | setUp(); 44 | } 45 | 46 | 47 | /*=======MAIN=====*/ 48 | int main(void) 49 | { 50 | UnityBegin("testdata/testsample.c"); 51 | RUN_TEST(test_TheFirstThingToTest, 21); 52 | RUN_TEST(test_TheSecondThingToTest, 43); 53 | RUN_TEST(test_TheThirdThingToTest, 53); 54 | RUN_TEST(test_TheFourthThingToTest, 58); 55 | 56 | return (UnityEnd()); 57 | } 58 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_head1.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | setUp(); \ 12 | TestFunc(); \ 13 | } \ 14 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 15 | { \ 16 | tearDown(); \ 17 | } \ 18 | UnityConcludeTest(); \ 19 | } 20 | 21 | /*=======Automagically Detected Files To Include=====*/ 22 | #include "unity.h" 23 | #include 24 | #include 25 | #include "testsample_head1.h" 26 | 27 | /*=======External Functions This Runner Calls=====*/ 28 | extern void setUp(void); 29 | extern void tearDown(void); 30 | extern void test_TheFirstThingToTest(void); 31 | extern void test_TheSecondThingToTest(void); 32 | extern void test_TheThirdThingToTest(void); 33 | extern void test_TheFourthThingToTest(void); 34 | 35 | 36 | /*=======Test Reset Option=====*/ 37 | void resetTest(void); 38 | void resetTest(void) 39 | { 40 | tearDown(); 41 | setUp(); 42 | } 43 | 44 | 45 | /*=======MAIN=====*/ 46 | int main(void) 47 | { 48 | UnityBegin("testdata/testsample.c"); 49 | RUN_TEST(test_TheFirstThingToTest, 21); 50 | RUN_TEST(test_TheSecondThingToTest, 43); 51 | RUN_TEST(test_TheThirdThingToTest, 53); 52 | RUN_TEST(test_TheFourthThingToTest, 58); 53 | 54 | return (UnityEnd()); 55 | } 56 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_head1.h: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | #ifndef _TESTSAMPLE_HEAD1_H 3 | #define _TESTSAMPLE_HEAD1_H 4 | 5 | #include "unity.h" 6 | #include "funky.h" 7 | #include "stanky.h" 8 | #include 9 | 10 | void test_TheFirstThingToTest(void); 11 | void test_TheSecondThingToTest(void); 12 | void test_TheThirdThingToTest(void); 13 | void test_TheFourthThingToTest(void); 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_mock_head1.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | CMock_Init(); \ 10 | UNITY_CLR_DETAILS(); \ 11 | if (TEST_PROTECT()) \ 12 | { \ 13 | setUp(); \ 14 | TestFunc(); \ 15 | } \ 16 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 17 | { \ 18 | tearDown(); \ 19 | CMock_Verify(); \ 20 | } \ 21 | CMock_Destroy(); \ 22 | UnityConcludeTest(); \ 23 | } 24 | 25 | /*=======Automagically Detected Files To Include=====*/ 26 | #include "unity.h" 27 | #include "cmock.h" 28 | #include 29 | #include 30 | #include "testsample_mock_head1.h" 31 | #include "Mockstanky.h" 32 | 33 | /*=======External Functions This Runner Calls=====*/ 34 | extern void setUp(void); 35 | extern void tearDown(void); 36 | extern void test_TheFirstThingToTest(void); 37 | extern void test_TheSecondThingToTest(void); 38 | 39 | 40 | /*=======Mock Management=====*/ 41 | static void CMock_Init(void) 42 | { 43 | Mockstanky_Init(); 44 | } 45 | static void CMock_Verify(void) 46 | { 47 | Mockstanky_Verify(); 48 | } 49 | static void CMock_Destroy(void) 50 | { 51 | Mockstanky_Destroy(); 52 | } 53 | 54 | /*=======Test Reset Option=====*/ 55 | void resetTest(void); 56 | void resetTest(void) 57 | { 58 | CMock_Verify(); 59 | CMock_Destroy(); 60 | tearDown(); 61 | CMock_Init(); 62 | setUp(); 63 | } 64 | 65 | 66 | /*=======MAIN=====*/ 67 | int main(void) 68 | { 69 | UnityBegin("testdata/mocksample.c"); 70 | RUN_TEST(test_TheFirstThingToTest, 21); 71 | RUN_TEST(test_TheSecondThingToTest, 43); 72 | 73 | CMock_Guts_MemFreeFinal(); 74 | return (UnityEnd()); 75 | } 76 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_mock_head1.h: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | #ifndef _TESTSAMPLE_MOCK_HEAD1_H 3 | #define _TESTSAMPLE_MOCK_HEAD1_H 4 | 5 | #include "unity.h" 6 | #include "cmock.h" 7 | #include "funky.h" 8 | #include 9 | 10 | void test_TheFirstThingToTest(void); 11 | void test_TheSecondThingToTest(void); 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_new1.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | CEXCEPTION_T e; \ 12 | Try { \ 13 | setUp(); \ 14 | TestFunc(); \ 15 | } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!"); } \ 16 | } \ 17 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 18 | { \ 19 | tearDown(); \ 20 | } \ 21 | UnityConcludeTest(); \ 22 | } 23 | 24 | /*=======Automagically Detected Files To Include=====*/ 25 | #include "unity.h" 26 | #include 27 | #include 28 | #include "CException.h" 29 | #include "one.h" 30 | #include "two.h" 31 | #include "funky.h" 32 | #include "stanky.h" 33 | #include 34 | 35 | int GlobalExpectCount; 36 | int GlobalVerifyOrder; 37 | char* GlobalOrderError; 38 | 39 | /*=======External Functions This Runner Calls=====*/ 40 | extern void setUp(void); 41 | extern void tearDown(void); 42 | extern void test_TheFirstThingToTest(void); 43 | extern void test_TheSecondThingToTest(void); 44 | extern void test_TheThirdThingToTest(void); 45 | extern void test_TheFourthThingToTest(void); 46 | 47 | 48 | /*=======Test Reset Option=====*/ 49 | void resetTest(void); 50 | void resetTest(void) 51 | { 52 | tearDown(); 53 | setUp(); 54 | } 55 | 56 | 57 | /*=======MAIN=====*/ 58 | int main(void) 59 | { 60 | UnityBegin("testdata/testsample.c"); 61 | RUN_TEST(test_TheFirstThingToTest, 21); 62 | RUN_TEST(test_TheSecondThingToTest, 43); 63 | RUN_TEST(test_TheThirdThingToTest, 53); 64 | RUN_TEST(test_TheFourthThingToTest, 58); 65 | 66 | return (UnityEnd()); 67 | } 68 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_new2.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | setUp(); \ 12 | TestFunc(); \ 13 | } \ 14 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 15 | { \ 16 | tearDown(); \ 17 | } \ 18 | UnityConcludeTest(); \ 19 | } 20 | 21 | /*=======Automagically Detected Files To Include=====*/ 22 | #include "unity.h" 23 | #include 24 | #include 25 | #include "funky.h" 26 | #include "stanky.h" 27 | #include 28 | 29 | /*=======External Functions This Runner Calls=====*/ 30 | extern void setUp(void); 31 | extern void tearDown(void); 32 | extern void test_TheFirstThingToTest(void); 33 | extern void test_TheSecondThingToTest(void); 34 | extern void test_TheThirdThingToTest(void); 35 | extern void test_TheFourthThingToTest(void); 36 | 37 | 38 | /*=======Suite Setup=====*/ 39 | static int suite_setup(void) 40 | { 41 | a_custom_setup(); 42 | } 43 | 44 | /*=======Suite Teardown=====*/ 45 | static int suite_teardown(int num_failures) 46 | { 47 | a_custom_teardown(); 48 | } 49 | 50 | /*=======Test Reset Option=====*/ 51 | void resetTest(void); 52 | void resetTest(void) 53 | { 54 | tearDown(); 55 | setUp(); 56 | } 57 | 58 | 59 | /*=======MAIN=====*/ 60 | int main(void) 61 | { 62 | suite_setup(); 63 | UnityBegin("testdata/testsample.c"); 64 | RUN_TEST(test_TheFirstThingToTest, 21); 65 | RUN_TEST(test_TheSecondThingToTest, 43); 66 | RUN_TEST(test_TheThirdThingToTest, 53); 67 | RUN_TEST(test_TheFourthThingToTest, 58); 68 | 69 | return suite_teardown(UnityEnd()); 70 | } 71 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_param.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST_NO_ARGS 5 | #define RUN_TEST(TestFunc, TestLineNum, ...) \ 6 | { \ 7 | Unity.CurrentTestName = #TestFunc "(" #__VA_ARGS__ ")"; \ 8 | Unity.CurrentTestLineNumber = TestLineNum; \ 9 | Unity.NumberOfTests++; \ 10 | if (TEST_PROTECT()) \ 11 | { \ 12 | setUp(); \ 13 | TestFunc(__VA_ARGS__); \ 14 | } \ 15 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 16 | { \ 17 | tearDown(); \ 18 | } \ 19 | UnityConcludeTest(); \ 20 | } 21 | 22 | /*=======Automagically Detected Files To Include=====*/ 23 | #include "unity.h" 24 | #include 25 | #include 26 | #include "funky.h" 27 | #include "stanky.h" 28 | #include 29 | 30 | /*=======External Functions This Runner Calls=====*/ 31 | extern void setUp(void); 32 | extern void tearDown(void); 33 | extern void test_TheFirstThingToTest(void); 34 | extern void test_TheSecondThingToTest(void); 35 | extern void test_TheThirdThingToTest(void); 36 | extern void test_TheFourthThingToTest(void); 37 | 38 | 39 | /*=======Test Reset Option=====*/ 40 | void resetTest(void); 41 | void resetTest(void) 42 | { 43 | tearDown(); 44 | setUp(); 45 | } 46 | 47 | 48 | /*=======MAIN=====*/ 49 | int main(void) 50 | { 51 | UnityBegin("testdata/testsample.c"); 52 | RUN_TEST(test_TheFirstThingToTest, 21, RUN_TEST_NO_ARGS); 53 | RUN_TEST(test_TheSecondThingToTest, 43, RUN_TEST_NO_ARGS); 54 | RUN_TEST(test_TheThirdThingToTest, 53, RUN_TEST_NO_ARGS); 55 | RUN_TEST(test_TheFourthThingToTest, 58, RUN_TEST_NO_ARGS); 56 | 57 | return (UnityEnd()); 58 | } 59 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/expectdata/testsample_run2.c: -------------------------------------------------------------------------------- 1 | /* AUTOGENERATED FILE. DO NOT EDIT. */ 2 | 3 | /*=======Test Runner Used To Run Each Test Below=====*/ 4 | #define RUN_TEST(TestFunc, TestLineNum) \ 5 | { \ 6 | Unity.CurrentTestName = #TestFunc; \ 7 | Unity.CurrentTestLineNumber = TestLineNum; \ 8 | Unity.NumberOfTests++; \ 9 | if (TEST_PROTECT()) \ 10 | { \ 11 | setUp(); \ 12 | TestFunc(); \ 13 | } \ 14 | if (TEST_PROTECT() && !TEST_IS_IGNORED) \ 15 | { \ 16 | tearDown(); \ 17 | } \ 18 | UnityConcludeTest(); \ 19 | } 20 | 21 | /*=======Automagically Detected Files To Include=====*/ 22 | #include "unity.h" 23 | #include 24 | #include 25 | #include "funky.h" 26 | #include "stanky.h" 27 | #include 28 | 29 | /*=======External Functions This Runner Calls=====*/ 30 | extern void setUp(void); 31 | extern void tearDown(void); 32 | extern void test_TheFirstThingToTest(void); 33 | extern void test_TheSecondThingToTest(void); 34 | extern void test_TheThirdThingToTest(void); 35 | extern void test_TheFourthThingToTest(void); 36 | 37 | 38 | /*=======Suite Setup=====*/ 39 | static int suite_setup(void) 40 | { 41 | a_custom_setup(); 42 | } 43 | 44 | /*=======Suite Teardown=====*/ 45 | static int suite_teardown(int num_failures) 46 | { 47 | a_custom_teardown(); 48 | } 49 | 50 | /*=======Test Reset Option=====*/ 51 | void resetTest(void); 52 | void resetTest(void) 53 | { 54 | tearDown(); 55 | setUp(); 56 | } 57 | 58 | 59 | /*=======MAIN=====*/ 60 | int main(void) 61 | { 62 | suite_setup(); 63 | UnityBegin("testdata/testsample.c"); 64 | RUN_TEST(test_TheFirstThingToTest, 21); 65 | RUN_TEST(test_TheSecondThingToTest, 43); 66 | RUN_TEST(test_TheThirdThingToTest, 53); 67 | RUN_TEST(test_TheFourthThingToTest, 58); 68 | 69 | return suite_teardown(UnityEnd()); 70 | } 71 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/targets/gcc_32.yml: -------------------------------------------------------------------------------- 1 | compiler: 2 | path: gcc 3 | source_path: '../src/' 4 | unit_tests_path: &unit_tests_path 'tests/' 5 | build_path: &build_path 'build/' 6 | options: 7 | - '-c' 8 | - '-m32' 9 | - '-Wall' 10 | - '-Wno-address' 11 | - '-std=c99' 12 | - '-pedantic' 13 | includes: 14 | prefix: '-I' 15 | items: 16 | - 'src/' 17 | - '../src/' 18 | - 'testdata/' 19 | - *unit_tests_path 20 | defines: 21 | prefix: '-D' 22 | items: 23 | - UNITY_EXCLUDE_STDINT_H 24 | - UNITY_EXCLUDE_LIMITS_H 25 | - UNITY_INCLUDE_DOUBLE 26 | - UNITY_SUPPORT_TEST_CASES 27 | - UNITY_INT_WIDTH=32 28 | - UNITY_LONG_WIDTH=32 29 | object_files: 30 | prefix: '-o' 31 | extension: '.o' 32 | destination: *build_path 33 | linker: 34 | path: gcc 35 | options: 36 | - -lm 37 | - '-m32' 38 | includes: 39 | prefix: '-I' 40 | object_files: 41 | path: *build_path 42 | extension: '.o' 43 | bin_files: 44 | prefix: '-o' 45 | extension: '.exe' 46 | destination: *build_path 47 | colour: true 48 | :unity: 49 | :plugins: [] 50 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/targets/gcc_64.yml: -------------------------------------------------------------------------------- 1 | compiler: 2 | path: gcc 3 | source_path: '../src/' 4 | unit_tests_path: &unit_tests_path 'tests/' 5 | build_path: &build_path 'build/' 6 | options: 7 | - '-c' 8 | - '-m64' 9 | - '-Wall' 10 | - '-Wno-address' 11 | - '-std=c99' 12 | - '-pedantic' 13 | includes: 14 | prefix: '-I' 15 | items: 16 | - 'src/' 17 | - '../src/' 18 | - 'testdata/' 19 | - *unit_tests_path 20 | defines: 21 | prefix: '-D' 22 | items: 23 | - UNITY_EXCLUDE_STDINT_H 24 | - UNITY_EXCLUDE_LIMITS_H 25 | - UNITY_INCLUDE_DOUBLE 26 | - UNITY_SUPPORT_TEST_CASES 27 | - UNITY_SUPPORT_64 28 | - UNITY_INT_WIDTH=32 29 | - UNITY_LONG_WIDTH=64 30 | object_files: 31 | prefix: '-o' 32 | extension: '.o' 33 | destination: *build_path 34 | linker: 35 | path: gcc 36 | options: 37 | - -lm 38 | - '-m64' 39 | includes: 40 | prefix: '-I' 41 | object_files: 42 | path: *build_path 43 | extension: '.o' 44 | bin_files: 45 | prefix: '-o' 46 | extension: '.exe' 47 | destination: *build_path 48 | colour: true 49 | :unity: 50 | :plugins: [] 51 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/targets/gcc_auto_limits.yml: -------------------------------------------------------------------------------- 1 | compiler: 2 | path: gcc 3 | source_path: '../src/' 4 | unit_tests_path: &unit_tests_path 'tests/' 5 | build_path: &build_path 'build/' 6 | options: 7 | - '-c' 8 | - '-m64' 9 | - '-Wall' 10 | - '-Wno-address' 11 | - '-std=c99' 12 | - '-pedantic' 13 | includes: 14 | prefix: '-I' 15 | items: 16 | - 'src/' 17 | - '../src/' 18 | - 'testdata/' 19 | - *unit_tests_path 20 | defines: 21 | prefix: '-D' 22 | items: 23 | - UNITY_EXCLUDE_STDINT_H 24 | - UNITY_INCLUDE_DOUBLE 25 | - UNITY_SUPPORT_TEST_CASES 26 | - UNITY_SUPPORT_64 27 | object_files: 28 | prefix: '-o' 29 | extension: '.o' 30 | destination: *build_path 31 | linker: 32 | path: gcc 33 | options: 34 | - -lm 35 | - '-m64' 36 | includes: 37 | prefix: '-I' 38 | object_files: 39 | path: *build_path 40 | extension: '.o' 41 | bin_files: 42 | prefix: '-o' 43 | extension: '.exe' 44 | destination: *build_path 45 | colour: true 46 | :unity: 47 | :plugins: [] 48 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/targets/gcc_auto_stdint.yml: -------------------------------------------------------------------------------- 1 | compiler: 2 | path: gcc 3 | source_path: '../src/' 4 | unit_tests_path: &unit_tests_path 'tests/' 5 | build_path: &build_path 'build/' 6 | options: 7 | - '-c' 8 | - '-m64' 9 | - '-Wall' 10 | - '-Wno-address' 11 | - '-std=c99' 12 | - '-pedantic' 13 | - '-Wextra' 14 | - '-Werror' 15 | - '-Wpointer-arith' 16 | - '-Wcast-align' 17 | - '-Wwrite-strings' 18 | - '-Wswitch-default' 19 | - '-Wunreachable-code' 20 | - '-Winit-self' 21 | - '-Wmissing-field-initializers' 22 | - '-Wno-unknown-pragmas' 23 | - '-Wstrict-prototypes' 24 | - '-Wundef' 25 | - '-Wold-style-definition' 26 | includes: 27 | prefix: '-I' 28 | items: 29 | - 'src/' 30 | - '../src/' 31 | - 'testdata/' 32 | - *unit_tests_path 33 | defines: 34 | prefix: '-D' 35 | items: 36 | - UNITY_INCLUDE_DOUBLE 37 | - UNITY_SUPPORT_TEST_CASES 38 | - UNITY_SUPPORT_64 39 | object_files: 40 | prefix: '-o' 41 | extension: '.o' 42 | destination: *build_path 43 | linker: 44 | path: gcc 45 | options: 46 | - -lm 47 | - '-m64' 48 | includes: 49 | prefix: '-I' 50 | object_files: 51 | path: *build_path 52 | extension: '.o' 53 | bin_files: 54 | prefix: '-o' 55 | extension: '.exe' 56 | destination: *build_path 57 | colour: true 58 | :unity: 59 | :plugins: [] 60 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/targets/gcc_manual_math.yml: -------------------------------------------------------------------------------- 1 | compiler: 2 | path: gcc 3 | source_path: '../src/' 4 | unit_tests_path: &unit_tests_path 'tests/' 5 | build_path: &build_path 'build/' 6 | options: 7 | - '-c' 8 | - '-m64' 9 | - '-Wall' 10 | - '-Wno-address' 11 | - '-std=c99' 12 | - '-pedantic' 13 | includes: 14 | prefix: '-I' 15 | items: 16 | - 'src/' 17 | - '../src/' 18 | - 'testdata/' 19 | - *unit_tests_path 20 | defines: 21 | prefix: '-D' 22 | items: 23 | - UNITY_EXCLUDE_MATH_H 24 | - UNITY_INCLUDE_DOUBLE 25 | - UNITY_SUPPORT_TEST_CASES 26 | - UNITY_SUPPORT_64 27 | object_files: 28 | prefix: '-o' 29 | extension: '.o' 30 | destination: *build_path 31 | linker: 32 | path: gcc 33 | options: 34 | - -lm 35 | - '-m64' 36 | includes: 37 | prefix: '-I' 38 | object_files: 39 | path: *build_path 40 | extension: '.o' 41 | bin_files: 42 | prefix: '-o' 43 | extension: '.exe' 44 | destination: *build_path 45 | colour: true 46 | :unity: 47 | :plugins: [] 48 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/testdata/CException.h: -------------------------------------------------------------------------------- 1 | #ifndef CEXCEPTION_H 2 | #define CEXCEPTION_H 3 | 4 | #define CEXCEPTION_BEING_USED 1 5 | 6 | #define CEXCEPTION_NONE 0 7 | #define CEXCEPTION_T int e = 1; (void) 8 | #define Try if (e) 9 | #define Catch(a) if (!a) 10 | 11 | #endif //CEXCEPTION_H 12 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/testdata/Defs.h: -------------------------------------------------------------------------------- 1 | #ifndef DEF_H 2 | #define DEF_H 3 | 4 | #define EXTERN_DECL 5 | 6 | extern int CounterSuiteSetup; 7 | 8 | #endif //DEF_H 9 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/testdata/cmock.h: -------------------------------------------------------------------------------- 1 | #ifndef CMOCK_H 2 | #define CMOCK_H 3 | 4 | int CMockMemFreeFinalCounter = 0; 5 | int mockMock_Init_Counter = 0; 6 | int mockMock_Verify_Counter = 0; 7 | int mockMock_Destroy_Counter = 0; 8 | 9 | void CMock_Guts_MemFreeFinal(void) { CMockMemFreeFinalCounter++; } 10 | void mockMock_Init(void) { mockMock_Init_Counter++; } 11 | void mockMock_Verify(void) { mockMock_Verify_Counter++; } 12 | void mockMock_Destroy(void) { mockMock_Destroy_Counter++; } 13 | 14 | #endif //CMOCK_H 15 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/testdata/mockMock.h: -------------------------------------------------------------------------------- 1 | #ifndef MOCK_MOCK_H 2 | #define MOCK_MOCK_H 3 | 4 | extern int mockMock_Init_Counter; 5 | extern int mockMock_Verify_Counter; 6 | extern int mockMock_Destroy_Counter; 7 | extern int CMockMemFreeFinalCounter; 8 | 9 | void mockMock_Init(void); 10 | void mockMock_Verify(void); 11 | void mockMock_Destroy(void); 12 | 13 | #endif //MOCK_MOCK_H 14 | -------------------------------------------------------------------------------- /vendor/Unity-2.4.3/test/testdata/testRunnerGeneratorSmall.c: -------------------------------------------------------------------------------- 1 | /* This Test File Is Used To Verify Many Combinations Of Using the Generate Test Runner Script */ 2 | 3 | #include 4 | #include "unity.h" 5 | #include "Defs.h" 6 | 7 | TEST_FILE("some_file.c") 8 | 9 | /* Notes about prefixes: 10 | test - normal default prefix. these are "always run" tests for this procedure 11 | spec - normal default prefix. required to run default setup/teardown calls. 12 | */ 13 | 14 | /* Support for Meta Test Rig */ 15 | #define TEST_CASE(a) 16 | void putcharSpy(int c) { (void)putchar(c);} // include passthrough for linking tests 17 | 18 | /* Global Variables Used During These Tests */ 19 | int CounterSetup = 0; 20 | int CounterTeardown = 0; 21 | int CounterSuiteSetup = 0; 22 | 23 | void setUp(void) 24 | { 25 | CounterSetup = 1; 26 | } 27 | 28 | void tearDown(void) 29 | { 30 | CounterTeardown = 1; 31 | } 32 | 33 | void custom_setup(void) 34 | { 35 | CounterSetup = 2; 36 | } 37 | 38 | void custom_teardown(void) 39 | { 40 | CounterTeardown = 2; 41 | } 42 | 43 | void test_ThisTestAlwaysPasses(void) 44 | { 45 | TEST_PASS(); 46 | } 47 | 48 | void test_ThisTestAlwaysFails(void) 49 | { 50 | TEST_FAIL_MESSAGE("This Test Should Fail"); 51 | } 52 | 53 | void test_ThisTestAlwaysIgnored(void) 54 | { 55 | TEST_IGNORE_MESSAGE("This Test Should Be Ignored"); 56 | } 57 | 58 | void spec_ThisTestPassesWhenNormalSetupRan(void) 59 | { 60 | TEST_ASSERT_EQUAL_MESSAGE(1, CounterSetup, "Normal Setup Wasn't Run"); 61 | } 62 | 63 | void spec_ThisTestPassesWhenNormalTeardownRan(void) 64 | { 65 | TEST_ASSERT_EQUAL_MESSAGE(1, CounterTeardown, "Normal Teardown Wasn't Run"); 66 | } 67 | 68 | -------------------------------------------------------------------------------- /vendor/parson/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | test 3 | *.o 4 | -------------------------------------------------------------------------------- /vendor/parson/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(parson C) 3 | 4 | add_library(parson parson.c) 5 | target_include_directories(parson PUBLIC $) 6 | 7 | set_target_properties(parson PROPERTIES PUBLIC_HEADER "parson.h") 8 | 9 | install( 10 | TARGETS parson 11 | EXPORT parsonTargets 12 | RUNTIME DESTINATION bin 13 | LIBRARY DESTINATION lib 14 | ARCHIVE DESTINATION lib 15 | PUBLIC_HEADER DESTINATION include 16 | ) 17 | 18 | install( 19 | EXPORT parsonTargets 20 | FILE parsonConfig.cmake 21 | NAMESPACE parson:: 22 | DESTINATION cmake 23 | ) 24 | 25 | -------------------------------------------------------------------------------- /vendor/parson/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2012 - 2019 Krzysztof Gabis 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/parson/Makefile: -------------------------------------------------------------------------------- 1 | CC = gcc 2 | CFLAGS = -O0 -g -Wall -Wextra -std=c89 -pedantic-errors 3 | 4 | CPPC = g++ 5 | CPPFLAGS = -O0 -g -Wall -Wextra 6 | 7 | all: test testcpp 8 | 9 | .PHONY: test testcpp 10 | test: tests.c parson.c 11 | $(CC) $(CFLAGS) -o $@ tests.c parson.c 12 | ./$@ 13 | 14 | testcpp: tests.c parson.c 15 | $(CPPC) $(CPPFLAGS) -o $@ tests.c parson.c 16 | ./$@ 17 | 18 | clean: 19 | rm -f test *.o 20 | 21 | -------------------------------------------------------------------------------- /vendor/parson/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parson", 3 | "version": "0.0.0", 4 | "repo": "kgabis/parson", 5 | "description": "Small json parser and reader", 6 | "keywords": [ "json", "parser" ], 7 | "license": "MIT", 8 | "src": [ 9 | "parson.c", 10 | "parson.h" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /vendor/parson/tests/test_1_1.txt: -------------------------------------------------------------------------------- 1 | 2 | [ 3 | "JSON Test Pattern pass1", 4 | {"object with 1 member":["array with 1 element"]}, 5 | {}, 6 | [], 7 | -42, 8 | true, 9 | false, 10 | null, 11 | { 12 | "integer": 1234567890, 13 | "real": -9876.543210, 14 | "e": 0.123456789e-12, 15 | "E": 1.234567890E+34, 16 | "": 23456789012E66, 17 | "zero": 0, 18 | "one": 1, 19 | "space": " ", 20 | "quote": "\"", 21 | "backslash": "\\", 22 | "controls": "\b\f\n\r\t", 23 | "slash": "/ & \/", 24 | "alpha": "abcdefghijklmnopqrstuvwyz", 25 | "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ", 26 | "digit": "0123456789", 27 | "0123456789": "digit", 28 | "special": "`1~!@#$%^&*()_+-={':[,]}|;.?", 29 | "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A", 30 | "true": true, 31 | "false": false, 32 | "null": null, 33 | "array":[ ], 34 | "object":{ }, 35 | "address": "50 St. James Street", 36 | "url": "http://www.JSON.org/", 37 | "comment": "// /* */": " ", 39 | " s p a c e d " :[1,2 , 3 40 | 41 | , 42 | 43 | 4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7], 44 | "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}", 45 | "quotes": "" \u0022 %22 0x22 034 "", 46 | "\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?" 47 | : "A key can be any string" 48 | }, 49 | 0.5 ,98.6 50 | , 51 | 99.44 52 | , 53 | 54 | 1066, 55 | 1e1, 56 | 0.1e1, 57 | 1e-1, 58 | 1e00,2e+00,2e-00 59 | ,"rosebud"] -------------------------------------------------------------------------------- /vendor/parson/tests/test_1_3.txt: -------------------------------------------------------------------------------- 1 | { 2 | "JSON Test Pattern pass3": { 3 | "The outermost value": "must be an object or array.", 4 | "In this test": "It is an object." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vendor/parson/tests/test_2.txt: -------------------------------------------------------------------------------- 1 | { 2 | "string" : "lorem ipsum", 3 | "utf string" : "\u006corem\u0020ipsum", 4 | "utf-8 string": "あいうえお", 5 | "surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem", 6 | "positive one" : 1, 7 | "negative one" : -1, 8 | "pi" : 3.14, 9 | "hard to parse number" : -3.14e-4, 10 | "big int": 2147483647, 11 | "big uint": 4294967295, 12 | "boolean true" : true, 13 | "boolean false" : false, 14 | "null" : null, 15 | "string array" : ["lorem", "ipsum"], 16 | "x^2 array" : [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100], 17 | "/*" : null, 18 | "object" : { "nested string" : "str", 19 | "nested true" : true, 20 | "nested false" : false, 21 | "nested null" : null, 22 | "nested number" : 123, 23 | "nested array" : ["lorem", "ipsum"], 24 | "nested object" : {"lorem": "ipsum"} 25 | }, 26 | "*/" : null, 27 | "/**/" : "comment", 28 | "//" : "comment", 29 | "url" : "https:\/\/www.example.com\/search?q=12345", 30 | "escaped chars" : "\" \\ \/", 31 | "empty object" : {}, 32 | "empty array" : [] 33 | } 34 | -------------------------------------------------------------------------------- /vendor/parson/tests/test_2_comments.txt: -------------------------------------------------------------------------------- 1 | /* 2 | *Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 3 | *ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud 4 | *dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 5 | */ 6 | // Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor 7 | { /* lorem ipsum */ 8 | "string" : "lorem ipsum", // lorem ipsum 9 | "utf string" : "\u006corem\u0020ipsum", // lorem ipsum // 10 | "utf-8 string": "あいうえお", // /* lorem ipsum */ 11 | "surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem", 12 | "positive one" : 1, 13 | "negative one" : -1, 14 | "pi" : 3.14, 15 | "hard to parse number" : -3.14e-4, 16 | "big int": 2147483647, 17 | "big uint": 4294967295, 18 | "boolean true" : true, 19 | "boolean false" : false, 20 | "null" : null, 21 | "string array" : ["lorem",/*in array*/"ipsum"], 22 | "x^2 array" : [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100], 23 | /* "x^2 array" : [], 24 | */ 25 | "/*" : null, 26 | "object" : { "nested string" : "str", 27 | "nested true" : /* lorem ipsum */ true, 28 | "nested false" : false, 29 | "nested null" : null, // lorem ipsum 30 | "nested number" : 123, 31 | "nested array" : ["lorem", "ipsum"], 32 | "nested object" : {"lorem": "ipsum"} 33 | }, 34 | "*/" : null, 35 | "/**/" : "comment", 36 | "//" : "comment", 37 | "url" : "https:\/\/www.example.com\/search?q=12345", 38 | "escaped chars" : "\" \\ \/", 39 | "empty object" : {}, 40 | "empty array" : [] 41 | } 42 | /**/ 43 | // -------------------------------------------------------------------------------- /vendor/parson/tests/test_2_pretty.txt: -------------------------------------------------------------------------------- 1 | { 2 | "string": "lorem ipsum", 3 | "utf string": "lorem ipsum", 4 | "utf-8 string": "あいうえお", 5 | "surrogate string": "lorem𝄞ipsum𝍧lorem", 6 | "positive one": 1, 7 | "negative one": -1, 8 | "pi": 3.1400000000000001, 9 | "hard to parse number": -0.00031399999999999999, 10 | "big int": 2147483647, 11 | "big uint": 4294967295, 12 | "boolean true": true, 13 | "boolean false": false, 14 | "null": null, 15 | "string array": [ 16 | "lorem", 17 | "ipsum" 18 | ], 19 | "x^2 array": [ 20 | 0, 21 | 1, 22 | 4, 23 | 9, 24 | 16, 25 | 25, 26 | 36, 27 | 49, 28 | 64, 29 | 81, 30 | 100 31 | ], 32 | "\/*": null, 33 | "object": { 34 | "nested string": "str", 35 | "nested true": true, 36 | "nested false": false, 37 | "nested null": null, 38 | "nested number": 123, 39 | "nested array": [ 40 | "lorem", 41 | "ipsum" 42 | ] 43 | }, 44 | "*\/": null, 45 | "\/**\/": "comment", 46 | "\/\/": "comment", 47 | "url": "https:\/\/www.example.com\/search?q=12345", 48 | "escaped chars": "\" \\ \/", 49 | "empty object": {}, 50 | "empty array": [] 51 | } -------------------------------------------------------------------------------- /vendor/parson/tests/test_5.txt: -------------------------------------------------------------------------------- 1 | { 2 | "first": "John", 3 | "last": "Doe", 4 | "age": 25, 5 | "registered": true, 6 | "interests": [ "Reading", "Mountain Biking" ], 7 | "favorites": { 8 | "color": "blue", 9 | "sport": "running" 10 | }, 11 | "utf string" : "\u006corem\u0020ipsum", 12 | "utf-8 string": "あいうえお", 13 | "surrogate string": "lorem\uD834\uDD1Eipsum\uD834\uDF67lorem", 14 | "windows path": "C:\\Windows\\Path" 15 | } -------------------------------------------------------------------------------- /vendor/src/Unity-stamp/Unity-mkdir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/vendor/src/Unity-stamp/Unity-mkdir -------------------------------------------------------------------------------- /vendor/src/Unity-stamp/Unity-urlinfo.txt: -------------------------------------------------------------------------------- 1 | repository='external project URL' 2 | module='https://github.com/ThrowTheSwitch/Unity/archive/v2.4.3.tar.gz' 3 | tag='' 4 | -------------------------------------------------------------------------------- /vendor/src/Unity-stamp/extract-Unity.cmake: -------------------------------------------------------------------------------- 1 | # Make file names absolute: 2 | # 3 | get_filename_component(filename "/code/build/v2.4.3.tar.gz" ABSOLUTE) 4 | get_filename_component(directory "/code/vendor/unity" ABSOLUTE) 5 | 6 | message(STATUS "extracting... 7 | src='${filename}' 8 | dst='${directory}'") 9 | 10 | if(NOT EXISTS "${filename}") 11 | message(FATAL_ERROR "error: file to extract does not exist: '${filename}'") 12 | endif() 13 | 14 | # Prepare a space for extracting: 15 | # 16 | set(i 1234) 17 | while(EXISTS "${directory}/../ex-Unity${i}") 18 | math(EXPR i "${i} + 1") 19 | endwhile() 20 | set(ut_dir "${directory}/../ex-Unity${i}") 21 | file(MAKE_DIRECTORY "${ut_dir}") 22 | 23 | # Extract it: 24 | # 25 | message(STATUS "extracting... [tar xfz]") 26 | execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz ${filename} 27 | WORKING_DIRECTORY ${ut_dir} 28 | RESULT_VARIABLE rv) 29 | 30 | if(NOT rv EQUAL 0) 31 | message(STATUS "extracting... [error clean up]") 32 | file(REMOVE_RECURSE "${ut_dir}") 33 | message(FATAL_ERROR "error: extract of '${filename}' failed") 34 | endif() 35 | 36 | # Analyze what came out of the tar file: 37 | # 38 | message(STATUS "extracting... [analysis]") 39 | file(GLOB contents "${ut_dir}/*") 40 | list(REMOVE_ITEM contents "${ut_dir}/.DS_Store") 41 | list(LENGTH contents n) 42 | if(NOT n EQUAL 1 OR NOT IS_DIRECTORY "${contents}") 43 | set(contents "${ut_dir}") 44 | endif() 45 | 46 | # Move "the one" directory to the final directory: 47 | # 48 | message(STATUS "extracting... [rename]") 49 | file(REMOVE_RECURSE ${directory}) 50 | get_filename_component(contents ${contents} ABSOLUTE) 51 | file(RENAME ${contents} ${directory}) 52 | 53 | # Clean up: 54 | # 55 | message(STATUS "extracting... [clean up]") 56 | file(REMOVE_RECURSE "${ut_dir}") 57 | 58 | message(STATUS "extracting... done") 59 | -------------------------------------------------------------------------------- /vendor/src/Unity-stamp/verify-Unity.cmake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalocean/prometheus-client-c/c57034d196582d99267d027abb52a05a55dc07f6/vendor/src/Unity-stamp/verify-Unity.cmake --------------------------------------------------------------------------------