]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blobdiff - src/allmydata/test/check_load.py
test/check_load: hush (newer) pyflakes
[tahoe-lafs/tahoe-lafs.git] / src / allmydata / test / check_load.py
index 6b4d2cd5f7d0bc8a54889bafd1f91c2033073a7a..a5b3d3ee3dc93951c3b9338598e2e91fd8a13b35 100644 (file)
@@ -1,5 +1,3 @@
-#! /usr/bin/python
-
 """
 this is a load-generating client program. It does all of its work through a
 given tahoe node (specified by URL), and performs random reads and writes
@@ -54,9 +52,10 @@ if sys.argv[1] == "--stats":
                 if name not in stats:
                     stats[name] = 0
                 stats[name] += float(value)
+        del name
         if last_stats:
-            delta = dict( [ (name,stats[name]-last_stats[name])
-                            for name in stats ] )
+            delta = dict( [ (n,stats[n]-last_stats[n])
+                            for n in stats ] )
             print "THIS SAMPLE:"
             for name in sorted(delta.keys()):
                 avg = float(delta[name]) / float(DELAY)
@@ -97,12 +96,12 @@ bytes_downloaded = 0
 directories_read = 0
 directories_written = 0
 
-def listdir(nodeurl, root, vdrive_pathname):
+def listdir(nodeurl, root, remote_pathname):
     if nodeurl[-1] != "/":
         nodeurl += "/"
     url = nodeurl + "uri/%s/" % urllib.quote(root)
-    if vdrive_pathname:
-        url += urllib.quote(vdrive_pathname)
+    if remote_pathname:
+        url += urllib.quote(remote_pathname)
     url += "?t=json"
     data = urllib.urlopen(url).read()
     try:
@@ -203,11 +202,11 @@ def parse_url(url, defaultPort=None):
         path = "/"
     return scheme, host, port, path
 
-def generate_and_put(nodeurl, root, vdrive_fname, size):
+def generate_and_put(nodeurl, root, remote_filename, size):
     if nodeurl[-1] != "/":
         nodeurl += "/"
     url = nodeurl + "uri/%s/" % urllib.quote(root)
-    url += urllib.quote(vdrive_fname)
+    url += urllib.quote(remote_filename)
 
     scheme, host, port, path = parse_url(url)
     if scheme == "http":