search for: tvdiff

Displaying 20 results from an estimated 27 matches for "tvdiff".

Did you mean: tmdiff
2020 Oct 17
0
[PATCH nbdkit] common/include/tvdiff.h: Add formal specification.
This commit adds a formal specification of tvdiff_usec and a partial specification of subtract_timeval. These may be proved using Frama-C. The existing functions ignored overflow, but it is possible to call the functions with parameters that will cause overflow. So to create a formal specification I had to modify the functions to signal overflo...
2019 Sep 28
0
[PATCH nbdkit v2 1/4] common/include: Add function for subtracting struct timeval.
--- common/include/test-tvdiff.c | 75 +++++++++++++++++++++++++++++------- common/include/tvdiff.h | 13 ++++++- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/common/include/test-tvdiff.c b/common/include/test-tvdiff.c index 9cbcfc0..abefb2e 100644 --- a/common/include/test-tvdiff.c +++ b/common/include/...
2019 Sep 30
1
Re: [PATCH nbdkit v2 1/4] common/include: Add function for subtracting struct timeval.
On 9/28/19 3:02 PM, Richard W.M. Jones wrote: > --- > common/include/test-tvdiff.c | 75 +++++++++++++++++++++++++++++------- > common/include/tvdiff.h | 13 ++++++- > 2 files changed, 74 insertions(+), 14 deletions(-) > ACK > int > -main (void) > +main (int argc, char *argv[]) Not sure this part matters, but doesn't hurt either. > +++ b/...
2019 Sep 28
2
[PATCH nbdkit 1/2] common/include: Add function for subtracting struct timeval.
--- common/include/test-tvdiff.c | 75 +++++++++++++++++++++++++++++------- common/include/tvdiff.h | 13 ++++++- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/common/include/test-tvdiff.c b/common/include/test-tvdiff.c index 9cbcfc0..abefb2e 100644 --- a/common/include/test-tvdiff.c +++ b/common/include/...
2020 Apr 15
0
[PATCH nbdkit 1/9] common: Add a generic implementation of vectors.
...tignore | 1 + 4 files changed, 193 insertions(+) diff --git a/common/include/Makefile.am b/common/include/Makefile.am index 4482de37..3089a0a1 100644 --- a/common/include/Makefile.am +++ b/common/include/Makefile.am @@ -45,6 +45,7 @@ EXTRA_DIST = \ random.h \ rounding.h \ tvdiff.h \ + vector.h \ $(NULL) # Unit tests. @@ -59,6 +60,7 @@ TESTS = \ test-nextnonzero \ test-random \ test-tvdiff \ + test-vector \ $(NULL) check_PROGRAMS = $(TESTS) @@ -97,3 +99,7 @@ test_random_CFLAGS = $(WARNINGS_CFLAGS) test_tvdiff_SOURCES = test-tvdiff.c tvdiff.h test_tvdiff_CP...
2019 Sep 28
9
[PATCH nbdkit v2 0/4] info: Add mode for sending back server time.
v1 was: https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00361 v2: - Adds a patch to rename the reflection plugin to the info plugin. - Adds tests. Rich.
2019 Nov 30
1
Re: [PATCH nbdkit 1/3] filters: stats: Show size in GiB, rate in MiB/s
...ile changed, 19 insertions(+), 15 deletions(-) > > diff --git a/filters/stats/stats.c b/filters/stats/stats.c > index 98282e2..45bedae 100644 > --- a/filters/stats/stats.c > +++ b/filters/stats/stats.c > @@ -49,6 +49,10 @@ > #include "cleanup.h" > #include "tvdiff.h" > > +#define MiB 1048576.0 > +#define GiB 1073741824.0 > +#define USEC 1000000.0 > + > static char *filename; > static bool append; > static FILE *fp; > @@ -64,34 +68,34 @@ static uint64_t extents_ops, extents_bytes; > static uint64_t cache_ops, cache_byt...
2019 Nov 30
0
[PATCH nbdkit v2 1/3] filters: stats: Add size in GiB, show rate in MiB/s
...ts/stats.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/filters/stats/stats.c b/filters/stats/stats.c index ffc367c..6bef65c 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -49,6 +49,10 @@ #include "cleanup.h" #include "tvdiff.h" +#define MiB 1048576.0 +#define GiB 1073741824.0 +#define USEC 1000000.0 + static char *filename; static bool append; static FILE *fp; @@ -70,29 +74,35 @@ static stat extents_st = { "extents" }; static stat cache_st = { "cache" }; static inline double -calc_bp...
2019 Nov 30
0
[PATCH nbdkit 1/3] filters: stats: Show size in GiB, rate in MiB/s
...+++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/filters/stats/stats.c b/filters/stats/stats.c index 98282e2..45bedae 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -49,6 +49,10 @@ #include "cleanup.h" #include "tvdiff.h" +#define MiB 1048576.0 +#define GiB 1073741824.0 +#define USEC 1000000.0 + static char *filename; static bool append; static FILE *fp; @@ -64,34 +68,34 @@ static uint64_t extents_ops, extents_bytes; static uint64_t cache_ops, cache_bytes; static inline double -calc_bps (uint64_t by...
2006 Jan 25
14
No audio? Update your Asterisk
This morning we discovered a serious bug that stopped all bridged audio in our Asterisk servers. Mark found the problem and soon fixed it. If you get this problem today, please update your Asterisk server. A fix has been commited to the subversion repository for 1.2 as well as trunk. A fixed 1.2.3 release will be published on ftp.digium.com as soon as we can find a release engineer (consider
2019 Nov 30
5
[PATCH nbdkit 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s. - Measure time per operation, providing finer grain stats - Add missing stats for flush I hope that these changes will help to understand and imporve virt-v2v performance. Nir Soffer (3): filters: stats: Show size in GiB, rate in MiB/s filters: stats: Measure time per operation filters: stats: Add flush stats filters/stats/stats.c | 117
2019 Sep 28
0
[PATCH nbdkit 2/2] reflection: Add mode for reflecting server time.
...;stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/time.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -48,14 +49,29 @@ #include <nbdkit-plugin.h> +#include "byte-swapping.h" +#include "tvdiff.h" + /* The mode. */ enum mode { MODE_EXPORTNAME, MODE_BASE64EXPORTNAME, MODE_ADDRESS, + MODE_TIME, + MODE_UPTIME, + MODE_CONNTIME, }; static enum mode mode = MODE_EXPORTNAME; +/* Plugin load time. */ +static struct timeval load_t; + +static void +reflection_load (void) +{ +...
2019 Sep 28
0
[PATCH nbdkit v2 3/4] info: Add mode for sending back server time.
...;stdio.h> #include <stdlib.h> #include <string.h> +#include <sys/time.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> @@ -48,14 +49,29 @@ #include <nbdkit-plugin.h> +#include "byte-swapping.h" +#include "tvdiff.h" + /* The mode. */ enum mode { MODE_EXPORTNAME, MODE_BASE64EXPORTNAME, MODE_ADDRESS, + MODE_TIME, + MODE_UPTIME, + MODE_CONNTIME, }; static enum mode mode = MODE_EXPORTNAME; +/* Plugin load time. */ +static struct timeval load_t; + +static void +info_load (void) +{ + getti...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2019 Mar 05
0
[PATCH nbdkit] Add new filter for rate-limiting connections.
...e + * capacity in tokens, so multiply by the rate to get this. + */ + bucket->capacity = rate * capacity; + + /* Buckets start off full. */ + bucket->level = capacity; + + gettimeofday (&bucket->tv, NULL); +} + +/* Return the number of microseconds in y - x. */ +static int64_t +tvdiff (const struct timeval *x, const struct timeval *y) +{ + int64_t usec; + + usec = (y->tv_sec - x->tv_sec) * 1000000; + usec += y->tv_usec - x->tv_usec; + return usec; +} + +struct timespec +bucket_run (struct bucket *bucket, uint64_t *n) +{ + struct timespec ts; + struct timeval no...
2019 Mar 05
2
[PATCH nbdkit] Add new filter for rate-limiting connections.
For virt-v2v we have been discussing how to limit network bandwidth. The initial discussion has been around how to use cgroups to do this limiting, and that is still probably what we will go with in the end. However this patch gives us another possibility for certain virt-v2v inputs, especially VDDK. We could apply a filter on top of the nbdkit plugin which limits the rate at which it copies
2019 Jun 26
3
[nbdkit PATCH v2 0/2] adding nbdkit --run '$uri'
Since v1: - new patch to add uri_quote() - rebase on top of other recent patches needed while auditing shell_quote() - use uri_quote() instead of shell_quote() for producing $uri Eric Blake (2): common/utils: Add uri_quote and tests captive: Support $uri in --run docs/nbdkit-captive.pod | 8 ++- common/utils/utils.h | 1 + common/utils/test-quotes.c | 108
2019 May 17
0
[nbdkit PATCH 3/3] filters: Use only .thread_model, not THREAD_MODEL
...LEL - /* Copied from server/plugins.c. */ #define MAX_REQUEST_SIZE (64 * 1024 * 1024) diff --git a/filters/stats/stats.c b/filters/stats/stats.c index 037fc61..4f94f73 100644 --- a/filters/stats/stats.c +++ b/filters/stats/stats.c @@ -47,8 +47,6 @@ #include "cleanup.h" #include "tvdiff.h" -#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL - static char *filename; static bool append; static FILE *fp; diff --git a/filters/truncate/truncate.c b/filters/truncate/truncate.c index 38b1cd9..64be839 100644 --- a/filters/truncate/truncate.c +++ b/filters/truncate/truncate.c @@ -4...
2019 Nov 30
4
[PATCH nbdkit v2 0/3] filters: stats: More useful, more friendly
- Use more friendly output with GiB and MiB/s - Measure time per operation, providing finer grain stats - Add total stats for understanding system throughput - Add missing stats for flush I hope that these changes will help to understand and improve virt-v2v performance. Changes since v1: - Keep bytes values - Increase precision to 0.001 GiB and 0.001 MiB/s - Add total stats - Show time before
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...and value. */ diff --git a/plugins/info/info.c b/plugins/info/info.c index 6505ffbb..33c4facd 100644 --- a/plugins/info/info.c +++ b/plugins/info/info.c @@ -49,6 +49,7 @@ #include <nbdkit-plugin.h> +#include "ascii-string.h" #include "byte-swapping.h" #include "tvdiff.h" @@ -76,12 +77,12 @@ static int info_config (const char *key, const char *value) { if (strcmp (key, "mode") == 0) { - if (strcasecmp (value, "exportname") == 0 || - strcasecmp (value, "export-name") == 0) { + if (ascii_strcasecmp (value, &quo...