[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 25/75: rps profiler: add correct make rule, util
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 25/75: rps profiler: add correct make rule, util |
Date: |
Thu, 09 Aug 2018 23:58:22 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 365e3bcae1e79c4f71f68e0d1d41172d86c51e76
Author: Julius Bünger <address@hidden>
AuthorDate: Fri Jun 8 01:23:45 2018 +0200
rps profiler: add correct make rule, util
---
src/rps/Makefile.am | 7 ++++++-
src/rps/rps-test_util.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
src/rps/rps-test_util.h | 3 +++
3 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/src/rps/Makefile.am b/src/rps/Makefile.am
index 33e03af76..d477ade92 100644
--- a/src/rps/Makefile.am
+++ b/src/rps/Makefile.am
@@ -141,7 +141,12 @@ test_rps_seed_big_LDADD = $(ld_rps_test_lib)
test_rps_churn_SOURCES = $(rps_test_src)
test_rps_churn_LDADD = $(ld_rps_test_lib)
-gnunet_rps_profiler_SOURCES = $(rps_test_src)
+gnunet_rps_profiler_SOURCES = \
+ gnunet-service-rps_sampler_elem.h gnunet-service-rps_sampler_elem.c \
+ rps-test_util.h rps-test_util.c \
+ gnunet-rps-profiler.c
+
+
gnunet_rps_profiler_LDADD = \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
libgnunetrps.la \
diff --git a/src/rps/rps-test_util.c b/src/rps/rps-test_util.c
index 0c81cc2b4..ea55deac5 100644
--- a/src/rps/rps-test_util.c
+++ b/src/rps/rps-test_util.c
@@ -107,6 +107,53 @@ to_file_ (const char *file_name, char *line)
"Unable to close file\n");
}
+void
+to_file_raw (const char *file_name, void *buf, size_t size_buf)
+{
+ struct GNUNET_DISK_FileHandle *f;
+ size_t size2;
+
+
+ if (NULL == (f = GNUNET_DISK_file_open (file_name,
+ GNUNET_DISK_OPEN_APPEND |
+ GNUNET_DISK_OPEN_WRITE |
+ GNUNET_DISK_OPEN_CREATE,
+ GNUNET_DISK_PERM_USER_READ |
+ GNUNET_DISK_PERM_USER_WRITE |
+ GNUNET_DISK_PERM_GROUP_READ |
+ GNUNET_DISK_PERM_OTHER_READ)))
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Not able to open file %s\n",
+ file_name);
+ return;
+ }
+
+ size2 = GNUNET_DISK_file_write (f, buf, size_buf);
+ if (size_buf != size2)
+ {
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Unable to write to file! (Size: %u, size2: %u)\n",
+ size_buf,
+ size2);
+
+ if (GNUNET_YES != GNUNET_DISK_file_close (f))
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Unable to close file\n");
+
+ return;
+ }
+
+ //if (512 < size_buf)
+ //{
+ // GNUNET_free (output_buffer_p);
+ //}
+
+ //if (GNUNET_YES != GNUNET_DISK_file_close (f))
+ // LOG (GNUNET_ERROR_TYPE_WARNING,
+ // "Unable to close file\n");
+}
+
char *
auth_key_to_string (struct GNUNET_CRYPTO_AuthKey auth_key)
{
diff --git a/src/rps/rps-test_util.h b/src/rps/rps-test_util.h
index 2213e50d8..d42422750 100644
--- a/src/rps/rps-test_util.h
+++ b/src/rps/rps-test_util.h
@@ -74,5 +74,8 @@ const char *
store_prefix_file_name (const struct GNUNET_PeerIdentity *peer,
const char *prefix);
+void
+to_file_raw (const char *file_name, void *buf, size_t size_buf);
+
#endif /* RPS_TEST_UTIL_H */
/* end of gnunet-service-rps.c */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 06/75: extend the list of known package maintainers, (continued)
- [GNUnet-SVN] [gnunet] 06/75: extend the list of known package maintainers, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 07/75: cleanup identity rest api, removed jsonapi includes, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 18/75: add -z option to gnunet-namestore-fcfsd, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 17/75: add LEHO records to DNS record sets if we know them from GNS2DNS, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 19/75: add -z option to gnunet-namestore-fcfsd, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 22/75: fix the stupid, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 11/75: README rework part 1, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 29/75: Fix the link to the preliminary documentation, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 23/75: config: file name expansion in all -f cases, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 26/75: doc: create system specific folder and move files into it, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 25/75: rps profiler: add correct make rule, util,
gnunet <=
- [GNUnet-SVN] [gnunet] 37/75: ensure DHT never accepts or passes along expired blocks, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 39/75: rps profiler: cleaned debug output, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 30/75: remove crypto_bug.c, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 28/75: README: Mention further reading material, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 34/75: complain if datacache returns expired values, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 21/75: avoid looping on listing of zone, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 31/75: -wip error gns, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 36/75: tell mysql that our integers are unsigned, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 40/75: doc: Add new files to Makefile., gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 38/75: rps profiler: generate output for randomness tests, gnunet, 2018/08/09