gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated (e1b2c2dd1 -> ba84cc9cf)


From: gnunet
Subject: [gnunet] branch master updated (e1b2c2dd1 -> ba84cc9cf)
Date: Mon, 16 Oct 2023 18:07:33 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a change to branch master
in repository gnunet.

    from e1b2c2dd1 meson: add datastore tests
     new d946cec18 datacache: remove broken benchmark tests
     new ba84cc9cf build: fix get_version location

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 configure.ac                                    |   8 +-
 src/datacache/Makefile.am                       |  38 +----
 src/datacache/meson.build                       |  36 -----
 src/datacache/perf_datacache.c                  | 179 ------------------------
 src/datacache/perf_datacache_data_heap.conf     |   5 -
 src/datacache/perf_datacache_data_postgres.conf |   8 --
 src/datacache/perf_datacache_data_sqlite.conf   |   4 -
 7 files changed, 5 insertions(+), 273 deletions(-)
 delete mode 100644 src/datacache/perf_datacache.c
 delete mode 100644 src/datacache/perf_datacache_data_heap.conf
 delete mode 100644 src/datacache/perf_datacache_data_postgres.conf
 delete mode 100644 src/datacache/perf_datacache_data_sqlite.conf

diff --git a/configure.ac b/configure.ac
index 8f67ed651..69b2e4694 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,10 +22,10 @@
 AC_PREREQ([2.69])
 AC_INIT([gnunet],[m4_esyscmd_s(sh 
scripts/get_version.sh)],[bug-gnunet@gnu.org])
 
-gnunet_version=m4_esyscmd_s(sh contrib/get_version.sh)
-gnunet_major_version=m4_esyscmd_s(sh contrib/get_version.sh --major)
-gnunet_minor_version=m4_esyscmd_s(sh contrib/get_version.sh --minor)
-gnunet_micro_version=m4_esyscmd_s(sh contrib/get_version.sh --micro)
+gnunet_version=m4_esyscmd_s(sh scripts/get_version.sh)
+gnunet_major_version=m4_esyscmd_s(sh scripts/get_version.sh --major)
+gnunet_minor_version=m4_esyscmd_s(sh scripts/get_version.sh --minor)
+gnunet_micro_version=m4_esyscmd_s(sh scripts/get_version.sh --micro)
 
 AC_SUBST([gnunet_version])
 AC_SUBST([gnunet_major_version])
diff --git a/src/datacache/Makefile.am b/src/datacache/Makefile.am
index 14778e0a3..1ae4744a8 100644
--- a/src/datacache/Makefile.am
+++ b/src/datacache/Makefile.am
@@ -93,35 +93,23 @@ libgnunet_plugin_datacache_template_la_LDFLAGS = \
 
 
 if HAVE_SQLITE
-if HAVE_BENCHMARKS
- SQLITE_BENCHMARKS = \
-  perf_datacache_sqlite
-endif
 SQLITE_TESTS = \
  test_datacache_sqlite \
  test_datacache_quota_sqlite \
  $(SQLITE_BENCHMARKS)
-
-if HAVE_BENCHMARKS
- HEAP_BENCHMARKS = \
-  perf_datacache_heap
 endif
+
 HEAP_TESTS = \
  test_datacache_heap \
  test_datacache_quota_heap \
  $(HEAP_BENCHMARKS)
 
 if HAVE_POSTGRESQL
-if HAVE_BENCHMARKS
- POSTGRES_BENCHMARKS = \
-  perf_datacache_postgres
-endif
 POSTGRES_TESTS = \
  test_datacache_postgres \
  test_datacache_quota_postgres \
  $(POSTGRES_BENCHMARKS)
 endif
-endif
 
 check_PROGRAMS = \
  $(SQLITE_TESTS) \
@@ -147,13 +135,6 @@ test_datacache_quota_sqlite_LDADD = \
  libgnunetdatacache.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
-perf_datacache_sqlite_SOURCES = \
- perf_datacache.c
-perf_datacache_sqlite_LDADD = \
- $(top_builddir)/src/testing/libgnunettesting.la \
- libgnunetdatacache.la \
- $(top_builddir)/src/util/libgnunetutil.la
-
 test_datacache_heap_SOURCES = \
  test_datacache.c
 test_datacache_heap_LDADD = \
@@ -168,13 +149,6 @@ test_datacache_quota_heap_LDADD = \
  libgnunetdatacache.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
-perf_datacache_heap_SOURCES = \
- perf_datacache.c
-perf_datacache_heap_LDADD = \
- $(top_builddir)/src/testing/libgnunettesting.la \
- libgnunetdatacache.la \
- $(top_builddir)/src/util/libgnunetutil.la
-
 test_datacache_postgres_SOURCES = \
  test_datacache.c
 test_datacache_postgres_LDADD = \
@@ -189,18 +163,8 @@ test_datacache_quota_postgres_LDADD = \
  libgnunetdatacache.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
-perf_datacache_postgres_SOURCES = \
- perf_datacache.c
-perf_datacache_postgres_LDADD = \
- $(top_builddir)/src/testing/libgnunettesting.la \
- libgnunetdatacache.la \
- $(top_builddir)/src/util/libgnunetutil.la
-
 EXTRA_DIST = \
  test_datacache_data_sqlite.conf \
- perf_datacache_data_sqlite.conf \
  test_datacache_data_heap.conf \
- perf_datacache_data_heap.conf \
  test_datacache_data_postgres.conf \
- perf_datacache_data_postgres.conf \
  $(sql_DATA)
diff --git a/src/datacache/meson.build b/src/datacache/meson.build
index 775f2ee61..91bf1a02d 100644
--- a/src/datacache/meson.build
+++ b/src/datacache/meson.build
@@ -78,16 +78,6 @@ testdc_quota_sqlite = executable 
('test_datacache_quota_sqlite',
             include_directories: [incdir, configuration_inc],
             install: false)
 
-#testdc_perf_sqlite = executable ('perf_datacache_sqlite',
-#            ['perf_datacache.c'],
-#            dependencies: [
-#              libgnunetdatacache_dep,
-#              libgnunetutil_dep,
-#              libgnunettesting_dep
-#              ],
-#            include_directories: [incdir, configuration_inc],
-#            install: false)
-
 testdc_heap = executable ('test_datacache_heap',
             ['test_datacache.c'],
             dependencies: [
@@ -108,15 +98,6 @@ testdc_quota_heap = executable ('test_datacache_quota_heap',
             include_directories: [incdir, configuration_inc],
             install: false)
 
-#testdc_perf_heap = executable ('perf_datacache_heap',
-#            ['perf_datacache.c'],
-#            dependencies: [
-#              libgnunetdatacache_dep,
-#              libgnunetutil_dep,
-#              libgnunettesting_dep
-#             ],
-#            include_directories: [incdir, configuration_inc],
-#            install: false)
 
 testdc_pq = executable ('test_datacache_postgres',
             ['test_datacache.c'],
@@ -138,16 +119,6 @@ testdc_quota_pq = executable 
('test_datacache_quota_postgres',
             include_directories: [incdir, configuration_inc],
             install: false)
 
-#testdc_perf_pq = executable ('perf_datacache_postgres',
-#            ['perf_datacache.c'],
-#            dependencies: [
-#              libgnunetdatacache_dep,
-#              libgnunetutil_dep,
-#              libgnunettesting_dep
-#              ],
-#            include_directories: [incdir, configuration_inc],
-#            install: false)
-
 configure_file(input : 'test_datacache_data_sqlite.conf',
                output : 'test_datacache_data_sqlite.conf',
                copy: true)
@@ -162,18 +133,11 @@ test('test_datacache_sqlite', testdc_sqlite,
   suite: 'datacache', workdir: meson.current_build_dir())
 test('test_datacache_quota_sqlite', testdc_quota_sqlite,
   suite: 'datacache', workdir: meson.current_build_dir())
-#test('perf_datacache_sqlite', testdc_perf_sqlite,
-#  suite: 'datacache', workdir: meson.current_build_dir())
 test('test_datacache_heap', testdc_heap,
   suite: 'datacache', workdir: meson.current_build_dir())
 test('test_datacache_quota_heap', testdc_quota_heap,
   suite: 'datacache', workdir: meson.current_build_dir())
-#test('perf_datacache_heap', testdc_perf_heap,
-#  suite: 'datacache', workdir: meson.current_build_dir())
 test('test_datacache_postgres', testdc_pq,
   suite: 'datacache', workdir: meson.current_build_dir())
 test('test_datacache_quota_postgres', testdc_quota_pq,
   suite: 'datacache', workdir: meson.current_build_dir())
-#test('perf_datacache_postgres', testdc_perf_pq,
-#  suite: 'datacache', workdir: meson.current_build_dir())
-
diff --git a/src/datacache/perf_datacache.c b/src/datacache/perf_datacache.c
deleted file mode 100644
index 3c9666dc4..000000000
--- a/src/datacache/perf_datacache.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
-     This file is part of GNUnet.
-     Copyright (C) 2006, 2009, 2010 GNUnet e.V.
-
-     GNUnet is free software: you can redistribute it and/or modify it
-     under the terms of the GNU Affero General Public License as published
-     by the Free Software Foundation, either version 3 of the License,
-     or (at your option) any later version.
-
-     GNUnet is distributed in the hope that it will be useful, but
-     WITHOUT ANY WARRANTY; without even the implied warranty of
-     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-     Affero General Public License for more details.
-
-     You should have received a copy of the GNU Affero General Public License
-     along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-     SPDX-License-Identifier: AGPL3.0-or-later
- */
-/*
- * @file datacache/perf_datacache.c
- * @brief Performance evaluation for the datacache implementations.
- * @author Nils Durner
- */
-#include "platform.h"
-#include "gnunet_util_lib.h"
-#include "gnunet_datacache_lib.h"
-#include "gnunet_testing_lib.h"
-#include <gauger.h>
-
-
-#define ASSERT(x) do { if (! (x)) { printf ("Error at %s:%d\n", __FILE__, \
-                                            __LINE__); goto FAILURE; \
-                       } } while (0)
-
-#define ITERATIONS 10000
-
-static int ok;
-
-static unsigned int found;
-
-/**
- * Name of plugin under test.
- */
-static const char *plugin_name;
-
-
-static int
-checkIt (void *cls,
-         const struct GNUNET_HashCode *key,
-         size_t size,
-         const char *data,
-         enum GNUNET_BLOCK_Type type,
-         struct GNUNET_TIME_Absolute exp,
-         unsigned int path_len,
-         const struct GNUNET_DHT_PathElement *path)
-{
-  if ( (size == sizeof(struct GNUNET_HashCode)) &&
-       (0 == memcmp (data,
-                     cls,
-                     size)) )
-    found++;
-  return GNUNET_OK;
-}
-
-
-static void
-run (void *cls,
-     char *const *args,
-     const char *cfgfile,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
-{
-  struct GNUNET_DATACACHE_Handle *h;
-  struct GNUNET_HashCode k;
-  struct GNUNET_HashCode n;
-  struct GNUNET_TIME_Absolute exp;
-  struct GNUNET_TIME_Absolute start;
-  unsigned int i;
-  char gstr[128];
-
-  ok = 0;
-  h = GNUNET_DATACACHE_create (cfg, "perfcache");
-
-  if (h == NULL)
-  {
-    fprintf (stderr, "%s",
-             "Failed to initialize datacache.  Database likely not setup, 
skipping test.\n");
-    ok = 77;   /* mark test as skipped */
-    return;
-  }
-  exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS);
-  start = GNUNET_TIME_absolute_get ();
-  memset (&k, 0, sizeof(struct GNUNET_HashCode));
-  for (i = 0; i < ITERATIONS; i++)
-  {
-    if (0 == i % (ITERATIONS / 80))
-      fprintf (stderr, "%s", ".");
-    GNUNET_CRYPTO_hash (&k, sizeof(struct GNUNET_HashCode), &n);
-    ASSERT (GNUNET_OK ==
-            GNUNET_DATACACHE_put (h, &k, sizeof(struct GNUNET_HashCode),
-                                  (const char *) &n, 1 + i % 16, exp,
-                                  0, NULL));
-    k = n;
-  }
-  fprintf (stderr, "%s", "\n");
-  fprintf (stdout, "Stored %u items in %s\n", ITERATIONS,
-           GNUNET_STRINGS_relative_time_to_string (
-             GNUNET_TIME_absolute_get_duration (start), GNUNET_YES));
-  GNUNET_snprintf (gstr, sizeof(gstr), "DATACACHE-%s", plugin_name);
-  GAUGER (gstr, "Time to PUT item in datacache",
-          GNUNET_TIME_absolute_get_duration (start).rel_value_us / 1000LL
-          / ITERATIONS,
-          "ms/item");
-  start = GNUNET_TIME_absolute_get ();
-  memset (&k, 0, sizeof(struct GNUNET_HashCode));
-  for (i = 0; i < ITERATIONS; i++)
-  {
-    if (0 == i % (ITERATIONS / 80))
-      fprintf (stderr, "%s", ".");
-    GNUNET_CRYPTO_hash (&k, sizeof(struct GNUNET_HashCode), &n);
-    GNUNET_DATACACHE_get (h, &k, 1 + i % 16, &checkIt, &n);
-    k = n;
-  }
-  fprintf (stderr, "%s", "\n");
-  fprintf (stdout,
-           "Found %u/%u items in %s (%u were deleted during storage 
processing)\n",
-           found, ITERATIONS,
-           GNUNET_STRINGS_relative_time_to_string (
-             GNUNET_TIME_absolute_get_duration (start), GNUNET_YES),
-           ITERATIONS - found);
-  if (found > 0)
-    GAUGER (gstr, "Time to GET item from datacache",
-            GNUNET_TIME_absolute_get_duration (start).rel_value_us / 1000LL
-            / found,
-            "ms/item");
-  GNUNET_DATACACHE_destroy (h);
-  ASSERT (ok == 0);
-  return;
-FAILURE:
-  if (h != NULL)
-    GNUNET_DATACACHE_destroy (h);
-  ok = GNUNET_SYSERR;
-}
-
-
-int
-main (int argc, char *argv[])
-{
-  char cfg_name[PATH_MAX];
-  char *const xargv[] = {
-    "perf-datacache",
-    "-c",
-    cfg_name,
-    NULL
-  };
-  struct GNUNET_GETOPT_CommandLineOption options[] = {
-    GNUNET_GETOPT_OPTION_END
-  };
-
-  GNUNET_log_setup ("perf-datacache",
-                    "WARNING",
-                    NULL);
-  plugin_name = GNUNET_STRINGS_get_suffix_from_binary_name (argv[0]);
-  GNUNET_snprintf (cfg_name, sizeof(cfg_name), "perf_datacache_data_%s.conf",
-                   plugin_name);
-  if (GNUNET_OK != GNUNET_PROGRAM_run ((sizeof(xargv) / sizeof(char *)) - 1,
-                                       xargv,
-                                       "perf-datacache", "nohelp", options,
-                                       &run, NULL))
-  {
-    return 1;
-  }
-  if ((0 != ok) && (77 != ok))
-    fprintf (stderr, "Missed some perfcases: %d\n", ok);
-  return ok;
-}
-
-
-/* end of perf_datacache.c */
diff --git a/src/datacache/perf_datacache_data_heap.conf 
b/src/datacache/perf_datacache_data_heap.conf
deleted file mode 100644
index 3680c020b..000000000
--- a/src/datacache/perf_datacache_data_heap.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[perfcache]
-QUOTA = 500 KB
-DATABASE = heap
-
-
diff --git a/src/datacache/perf_datacache_data_postgres.conf 
b/src/datacache/perf_datacache_data_postgres.conf
deleted file mode 100644
index c92f52a04..000000000
--- a/src/datacache/perf_datacache_data_postgres.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-[perfcache]
-QUOTA = 500 KB
-DATABASE = postgres
-
-[datacache-postgres]
-CONFIG = connect_timeout=10; dbname=gnunetcheck
-
-
diff --git a/src/datacache/perf_datacache_data_sqlite.conf 
b/src/datacache/perf_datacache_data_sqlite.conf
deleted file mode 100644
index 9d0dbbdba..000000000
--- a/src/datacache/perf_datacache_data_sqlite.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[perfcache]
-QUOTA = 500 KB
-DATABASE = sqlite
-

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]