Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package logfilegen for openSUSE:Factory checked in at 2023-02-09 16:22:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logfilegen (Old) and /work/SRC/openSUSE:Factory/.logfilegen.new.4462 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logfilegen" Thu Feb 9 16:22:23 2023 rev:4 rq:1063871 version:1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/logfilegen/logfilegen.changes 2023-02-07 18:49:06.823140907 +0100 +++ /work/SRC/openSUSE:Factory/.logfilegen.new.4462/logfilegen.changes 2023-02-09 16:22:38.174536551 +0100 @@ -1,0 +2,8 @@ +Wed Feb 8 15:50:26 UTC 2023 - Andreas Stieger <[email protected]> + +- logfilegen 1.2.0: + * The log rotation queue minimal length is 1 now, i.e. one log + file + at least one rotation file, if needed. + * Add a new, simpler version of the benchmark: --test + +------------------------------------------------------------------- Old: ---- logfilegen-1.1.0.tar.gz New: ---- logfilegen-1.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logfilegen.spec ++++++ --- /var/tmp/diff_new_pack.I6BsKK/_old 2023-02-09 16:22:38.666539086 +0100 +++ /var/tmp/diff_new_pack.I6BsKK/_new 2023-02-09 16:22:38.674539127 +0100 @@ -18,7 +18,7 @@ Name: logfilegen -Version: 1.1.0 +Version: 1.2.0 Release: 0 Summary: Log file generator for server log files and user-defined formats License: Unlicense ++++++ logfilegen-1.1.0.tar.gz -> logfilegen-1.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/.github/workflows/cmake.yml new/logfilegen-1.2.0/.github/workflows/cmake.yml --- old/logfilegen-1.1.0/.github/workflows/cmake.yml 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/.github/workflows/cmake.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,37 +0,0 @@ -name: CMake - -on: workflow_dispatch -# push: -# branches: [ "main" ] -# pull_request: -# branches: [ "main" ] - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release - -jobs: - build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-latest, windows-latest, macos-latest - - steps: - - uses: actions/checkout@v3 - - - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - - - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - -# - name: Test -# working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - #run: ctest -C ${{env.BUILD_TYPE}} - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/CMakeLists.txt new/logfilegen-1.2.0/CMakeLists.txt --- old/logfilegen-1.1.0/CMakeLists.txt 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/CMakeLists.txt 2023-02-08 13:26:17.000000000 +0100 @@ -2,7 +2,7 @@ set (CMAKE_CXX_STANDARD 17) -project (logfilegen VERSION 1.1.0 LANGUAGES CXX) +project (logfilegen VERSION 1.2.0 LANGUAGES CXX) add_definitions(-DVERSION_NUMBER="\\"${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}\\"") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/ChangeLog new/logfilegen-1.2.0/ChangeLog --- old/logfilegen-1.1.0/ChangeLog 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/ChangeLog 2023-02-08 13:26:17.000000000 +0100 @@ -1,3 +1,6 @@ ++ --test +* params.max_log_files < 1 fix + + DESTDIR support + $protocol //corrected + $server_protocol diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/NEWS new/logfilegen-1.2.0/NEWS --- old/logfilegen-1.1.0/NEWS 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/NEWS 2023-02-08 13:26:17.000000000 +0100 @@ -1,12 +1,5 @@ -What's new? -The new release is slighty faster. Two new macros were added: @meta and @seq. All of them are described at the documentation, here in a short - @meta allows to combine several macros into one, so we can use more than one macro at the simple (non-sequenced) variable value. And @seq can be used to use sequences at macro, as in the usual variable value. +This release adds a new, simplifier version of the benchmark: --test +A some sort of quick benchmark at full speed, using the default template for the current mode (nginx by default), one step of the log rotation; output to the temporary file at system's temporary directory (the output log will be deleted after all is done). Result, in lines per second, may vary depended on the randomizer engine work and use of gzip. +Useful to run on the clean installation, when we have no configs and templates yet. -Example 001: - -$test=@seq:GET:PUT -$logstring=hello, $test - -Example 002: - -$test=@meta:foo (@str:12) bar (@int:12:16) (@ip) -$logstring=hello, $test +Fixes: log rotation queue minimal length is 1 now, i.e. one log file + at least one rotation file, if needed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/cycle.cpp new/logfilegen-1.2.0/cycle.cpp --- old/logfilegen-1.1.0/cycle.cpp 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/cycle.cpp 2023-02-08 13:26:17.000000000 +0100 @@ -288,6 +288,12 @@ cout << "Benchmark, lines per seconds: " << lines_per_second << endl; } + if (params->test) + { + double lines_per_second = (double) lines_counter / duration_s.count(); + cout << "Test, lines per seconds: " << lines_per_second << endl; + } + if (params->stats) { double lines_per_second = (double) lines_counter / duration_s.count(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/docs/config.md new/logfilegen-1.2.0/docs/config.md --- old/logfilegen-1.1.0/docs/config.md 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/docs/config.md 2023-02-08 13:26:17.000000000 +0100 @@ -21,7 +21,9 @@ **pure=boolean** - "true" or "false" (default). It "true", logfilegen just generate log lines at the memory without the actual file output. -**benchmark=boolean** - "true" or "false" (default). It "true", logfilegen run the generation at full speed, with the current template (or the default one if not provided), to the current log file. Results, in lines per second, may vary depended on the template complexity, randomizer engine work, use of gzip, log rotation settings. +**test=boolean** - "true" or "false" (default). A some sort of quick benchmark at full speed, using the default template for the current mode (nginx by default), one step of the log rotation; output to the temporary file at system's temporary directory (the output log will be deleted after all is done). Result, in lines per second, may vary depended on the randomizer engine work and use of gzip. + +**benchmark=boolean** - "true" or "false" (default). It "true", logfilegen run the generation at full speed, with the current template (or the default one if not provided), to the current log file. Result, in lines per second, may vary depended on the template complexity, randomizer engine work, use of gzip, log rotation settings. Use ```benchmark``` instead of ```benchmark``` when you want to know the performance of some working template and config, on the given filesystem (```temp``` directory from ```test``` may have the performance different from the other disks or partitions). **duration=integer** - how many seconds runs the lines gerenation cycle. If 0 (zero), cycle will run until break by Ctrl-C. @@ -110,7 +112,10 @@ **LFG_SIZE** - set **size** -**LFG_BENCHMARK** - set **size** +**LFG_BENCHMARK** - set **becnhmark** + +**LFG_TEST** - set **test** + Example: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/main.cpp new/logfilegen-1.2.0/main.cpp --- old/logfilegen-1.1.0/main.cpp 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/main.cpp 2023-02-08 13:26:17.000000000 +0100 @@ -8,6 +8,7 @@ #include <vector> #include <iostream> #include <iomanip> +#include <filesystem> #include "pairfile.h" @@ -18,7 +19,7 @@ #ifndef VERSION_NUMBER -#define VERSION_NUMBER "1.1.0" +#define VERSION_NUMBER "1.2.0" #endif @@ -104,7 +105,7 @@ "LFG_TEMPLATE", "LFG_DEBUG", "LFG_PURE", "LFG_LOGSIZE", "LFG_LOGCOUNT", "LFG_GZIP", "LFG_LINES", "LFG_SIZE", "LFG_RANDOM", - "LFG_BENCHMARK", "LFG_STATS"}; + "LFG_BENCHMARK", "LFG_STATS", "LFG_TEST"}; CParameters params; string fname_config; @@ -152,6 +153,7 @@ params.templatefile = opts_config.get_string ("template", "NOTEMPLATEFILE"); params.timestamp = opts_config.get_string ("timestamp", "%d/%b/%Y:%H:%M:%S %z"); params.use_gzip = opts_config.get_bool ("gzip", false); + params.test = opts_config.get_bool ("test", false); if (params.debug) params.print(); @@ -165,6 +167,8 @@ CPairFile opts_cmdline (argc, argv); params.benchmark = opts_cmdline.get_bool ("benchmark", params.benchmark); + params.test = opts_cmdline.get_bool ("test", params.test); + params.debug = opts_cmdline.get_bool ("debug", params.debug); params.duration = opts_cmdline.get_num ("duration", params.duration); params.lines = opts_cmdline.get_num ("lines", params.lines); @@ -205,6 +209,7 @@ CPairFile opts_envars (envars); + params.test = opts_envars.get_bool ("test", params.test); params.benchmark = opts_envars.get_bool ("benchmark", params.benchmark); params.debug = opts_envars.get_bool ("debug", params.debug); params.duration = opts_envars.get_num ("duration", params.duration); @@ -223,6 +228,10 @@ params.timestamp = opts_envars.get_string ("timestamp", params.timestamp); params.use_gzip = opts_envars.get_bool ("gzip", params.use_gzip); + if (params.max_log_files < 1) + params.max_log_files = 1; + + if (params.debug) params.print(); @@ -268,6 +277,22 @@ return 0; } + if (params.test) + { + params.benchmark = false; + params.rate = 0; + params.duration = 5; + params.size = 0; + params.lines = 0; + params.max_log_files = 1; + params.bstdout = false; + + string tdir (std::filesystem::temp_directory_path()); + params.logfile = tdir + "/" + "logfilegen.log"; + cout << "params.logfile " << params.logfile << endl; + + fname_template = ""; + } if (params.benchmark) { @@ -292,6 +317,12 @@ cycle.loop(); } + if (params.test) + { + remove (params.logfile.c_str()); + string t = params.logfile + ".0"; + remove (t.c_str()); + } return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/params.cpp new/logfilegen-1.2.0/params.cpp --- old/logfilegen-1.1.0/params.cpp 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/params.cpp 2023-02-08 13:26:17.000000000 +0100 @@ -9,6 +9,8 @@ cout << "------------ Print parameters -------------" << endl; cout << "benchmark: " << benchmark << endl; + cout << "test: " << test << endl; + cout << "debug: " << debug << endl; cout << "duration: " << duration << endl; cout << "lines: " << lines << endl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logfilegen-1.1.0/params.h new/logfilegen-1.2.0/params.h --- old/logfilegen-1.1.0/params.h 2023-02-06 16:09:14.000000000 +0100 +++ new/logfilegen-1.2.0/params.h 2023-02-08 13:26:17.000000000 +0100 @@ -32,6 +32,7 @@ bool debug; bool benchmark; bool stats; + bool test; void print(); };
