--- /dev/null
+#!/usr/bin/python
+
+import os, subprocess, sys, time
+
+MNTDIR = '/mnt/bluesky'
+SERVER = 'c09-45.sysnet.ucsd.edu'
+
+class TestClient:
+ def setup_client(self, export):
+ subprocess.check_call(['mount', '-t', 'nfs',
+ '-o', 'vers=3,tcp,rw,soft,intr',
+ export, MNTDIR])
+
+ def cleanup_client(self):
+ subprocess.check_call(['umount', '-f', MNTDIR])
+
+ def run(self, export):
+ self.setup_client(export)
+ try:
+ results = self.run_test()
+ finally:
+ self.cleanup_client()
+ return results
+
+class BlueSkyServer:
+ def setup_server(self):
+ subprocess.call(['ssh', SERVER, ''])
+
+class SerialStat(TestClient):
+ """Call stat() on a set of files sequentially and measure the response time
+ for each call."""
+
+ def run_test(self):
+ files = [MNTDIR + "/file-%d" % (i,) for i in range(8)]
+
+ times = []
+ for f in files:
+ start = time.time()
+ os.stat(f)
+ times.append(time.time() - start)
+
+ return times
+
+if __name__ == '__main__':
+ test = SerialStat()
+ print test.run('niniel.sysnet.ucsd.edu:/export')
--- /dev/null
+#!/bin/bash
+
+# Create a directory with a number of small files. Space out the creation of
+# each file by several seconds so that for BlueSky, without running the
+# cleaner, the inodes should end up in separate log files in the cloud.
+mkdir small
+for i in {0..15}; do
+ sleep 5
+ dd if=/dev/urandom bs=4k count=1 of=small/file-$i
+done