jlayton/lockperf.git
9 years agolease02: Do a lock-unlock sequence instead of lock-lock master
Daniel Wagner [Wed, 4 Mar 2015 14:26:03 +0000 (15:26 +0100)]
lease02: Do a lock-unlock sequence instead of lock-lock

Fix the copy&paste error.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
9 years agoposix04: add new "posix04" test
Daniel Wagner [Mon, 2 Mar 2015 09:43:25 +0000 (10:43 +0100)]
posix04: add new "posix04" test

The dinning philosopher locking 'problem'. A given number of clients
try to lock on a file its own region and than the region 'right' from
its own region.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
9 years agoPrint leading zeros after decimal point
Daniel Wagner [Mon, 2 Mar 2015 09:43:24 +0000 (10:43 +0100)]
Print leading zeros after decimal point

The total time used for a test is a bit 'hard to read, because leading
zeros for the nsec part are missing, e.g.

      total.tv_sec = 1
      total.tv_nsec = 40013

results in

1.40013

instead of

1.000040013

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
9 years agognulib: clean up gnulib invocation
Jeff Layton [Thu, 19 Feb 2015 21:08:52 +0000 (16:08 -0500)]
gnulib: clean up gnulib invocation

Don't rely on the cache. Call the gnulib invocation directly.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
9 years agolease02: add new "lease02" test
Daniel Wagner [Thu, 19 Feb 2015 14:23:14 +0000 (15:23 +0100)]
lease02: add new "lease02" test

Add a microbench mark which test the performance of taking and
releasing a read lease with many processes in a tight loop.

Based on posix02.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
9 years agolease01: add new "lease01" test
Daniel Wagner [Thu, 19 Feb 2015 14:23:13 +0000 (15:23 +0100)]
lease01: add new "lease01" test

Add a microbench mark which test the performance of taking and
releasing a read lease in a tight loop.

Based on posix01.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
10 years agoposix03: clean up and integrate into lockperf framework
Jeff Layton [Wed, 14 Aug 2013 17:31:43 +0000 (13:31 -0400)]
posix03: clean up and integrate into lockperf framework

Modify Rusty's original reproducer to run in a loop. Integrate it into
autoconf, and have it use the gnulib routines instead of its own
time_* ones. Add routines to clean up the children when the parent
exits. Switch to getopt() for option processing.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoposix03: add new "posix03" test
Jeff Layton [Mon, 9 Sep 2013 19:13:57 +0000 (15:13 -0400)]
posix03: add new "posix03" test

...we start with the original reproducer program written by Rusty.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoposix01: allow child process to yield CPU after unlocking
Jeff Layton [Thu, 22 Aug 2013 19:14:09 +0000 (15:14 -0400)]
posix01: allow child process to yield CPU after unlocking

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoposix01: add "verbose" flag
Jeff Layton [Sat, 31 Aug 2013 23:45:57 +0000 (19:45 -0400)]
posix01: add "verbose" flag

When enabled, print pid that acquires the lock. This allows us to get
a feel for how "fair" the locking is.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agostats: comment out less interesting output fields
Jeff Layton [Sun, 9 Jun 2013 01:02:01 +0000 (21:02 -0400)]
stats: comment out less interesting output fields

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoharness: remove $arg before running
Jeff Layton [Sun, 9 Jun 2013 00:03:51 +0000 (20:03 -0400)]
harness: remove $arg before running

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agostats.pl: eliminate unneeded regex
Jeff Layton [Sat, 8 Jun 2013 13:23:09 +0000 (09:23 -0400)]
stats.pl: eliminate unneeded regex

Just assume that each line is a valid number.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoharness: fix braino with $destdir
Jeff Layton [Sat, 8 Jun 2013 11:16:22 +0000 (07:16 -0400)]
harness: fix braino with $destdir

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoflock: add tests for flock() performance
Jeff Layton [Sat, 8 Jun 2013 11:07:59 +0000 (07:07 -0400)]
flock: add tests for flock() performance

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agostats: add a perl script for postprocessing runs
Jeff Layton [Sat, 8 Jun 2013 11:03:08 +0000 (07:03 -0400)]
stats: add a perl script for postprocessing runs

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoposix02: double the number of locks
Jeff Layton [Sat, 8 Jun 2013 10:48:13 +0000 (06:48 -0400)]
posix02: double the number of locks

10240 doesn't take long enough to run.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoharness: add test harness script
Jeff Layton [Sat, 8 Jun 2013 10:47:37 +0000 (06:47 -0400)]
harness: add test harness script

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoposix0[1,2]: remove extraneous output labels
Jeff Layton [Sat, 8 Jun 2013 10:28:04 +0000 (06:28 -0400)]
posix0[1,2]: remove extraneous output labels

Remove the "Total time..." labels on the output, and simply don't print
anything to stdout if some of the children failed to run. If that
happens, then something likely went wrong and the numbers aren't to be
trusted anyway.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoRename perf1 and perf2 to posix01 and posix02
Jeff Layton [Sat, 8 Jun 2013 10:14:14 +0000 (06:14 -0400)]
Rename perf1 and perf2 to posix01 and posix02

...in preparation for tests that do other types of locking.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf1: don't close the file in critical section
Jeff Layton [Tue, 4 Jun 2013 19:12:26 +0000 (15:12 -0400)]
perf1: don't close the file in critical section

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf2: add stats gathering
Jeff Layton [Tue, 4 Jun 2013 19:10:51 +0000 (15:10 -0400)]
perf2: add stats gathering

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf1: add some stats gathering
Jeff Layton [Tue, 4 Jun 2013 17:11:51 +0000 (13:11 -0400)]
perf1: add some stats gathering

Use clock_gettime to gather some basic performance data.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agognulib: add timespec-add/sub definitions from gnulib
Jeff Layton [Tue, 4 Jun 2013 17:32:08 +0000 (13:32 -0400)]
gnulib: add timespec-add/sub definitions from gnulib

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoautoconfiscate the tree
Jeff Layton [Tue, 4 Jun 2013 17:18:02 +0000 (13:18 -0400)]
autoconfiscate the tree

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoFix up a couple of compiler nits
Jeff Layton [Tue, 4 Jun 2013 17:52:27 +0000 (13:52 -0400)]
Fix up a couple of compiler nits

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoMakefile: fix perf2 rule
Jeff Layton [Fri, 3 May 2013 11:16:38 +0000 (07:16 -0400)]
Makefile: fix perf2 rule

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoMakefile: add rules to build perf2
Jeff Layton [Fri, 3 May 2013 11:15:20 +0000 (07:15 -0400)]
Makefile: add rules to build perf2

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf2: add a new test
Jeff Layton [Fri, 3 May 2013 11:11:42 +0000 (07:11 -0400)]
perf2: add a new test

Fork off a bunch of children. Create a file in a directory for each one
and then have the child lock and unlock that file repeatedly.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf1: check argv[optind] instead of argv[1]
Jeff Layton [Fri, 3 May 2013 10:56:14 +0000 (06:56 -0400)]
perf1: check argv[optind] instead of argv[1]

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf1: comment cleanup
Jeff Layton [Fri, 3 May 2013 10:54:23 +0000 (06:54 -0400)]
perf1: comment cleanup

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoAdd a simple Makefile
Jeff Layton [Wed, 1 May 2013 18:52:56 +0000 (14:52 -0400)]
Add a simple Makefile

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoperf1: fix up some build-breaking bugs
Jeff Layton [Wed, 1 May 2013 13:42:20 +0000 (09:42 -0400)]
perf1: fix up some build-breaking bugs

Signed-off-by: Jeff Layton <jlayton@redhat.com>
10 years agoInitial commit
Jeff Layton [Wed, 1 May 2013 13:38:59 +0000 (09:38 -0400)]
Initial commit

...with initial perf1 test.