@@ -0,0 +1,1255 @@
+#!/usr/bin/env python%0A%0Aimport requests%0Aimport time%0Aimport sys%0Afrom pymongo.mongo_client import MongoClient%0A%0A%0AMONGO_DB = 'ws_test'%0ASHOCK_HOST = 'http://localhost:7044'%0A%0Adef main():%0A    token = sys.argv%5B1%5D%0A    mcli = MongoClient()%0A    db = mcli%5BMONGO_DB%5D%0A    ws = -1%0A    md5s = %5B%5D%0A    for ver in db.workspaceObjVersions.find().sort(%5B('ws', 1), ('id', 1)%5D):%0A        if ws == -1:%0A            ws = ver%5B'ws'%5D%0A        else:%0A            if ws != ver%5B'ws'%5D:%0A                raise ValueError('more than one workspace found')%0A        md5s.append(ver%5B'chksum'%5D)%0A    nodes = %5B%5D%0A    for md5 in md5s:%0A        rec = db.shock_nodeMap.find_one(%7B'chksum': md5%7D)%0A        nodes.append(rec%5B'node'%5D)%0A    print nodes%0A    headers = %7B'Authorization': 'OAuth ' + token%7D%0A    times = %5B%5D%0A    count = 1%0A    for node in nodes:%0A        now = time.clock()%0A        ret = requests.get(SHOCK_HOST + '/node/' + node + '/?download', headers=headers).text%0A        times.append(time.clock() - now)%0A        print count%0A        count += 1%0A    print 'N: ' + str(len(times))%0A    mean = sum(times) / float(len(times))%0A    print 'Mean: ' + str(mean)%0A    ss = sum((x - mean)**2 for x in times)%0A    print 'Stddev (sample): ' + str((ss/float(len(times) - 1))**0.5)%0A%0Aif __name__ == '__main__':%0A    main()%0A%0A

Add small script for calculating shock retrieval times