Changeset eee70fba in trunk


Ignore:
Timestamp:
2010-08-04T07:08:15Z (15 years ago)
Author:
Brian Warner <warner@…>
Branches:
master
Children:
6c2a4f0
Parents:
ebfde4f
Message:

storage-overhead: try to fix, probably still broken

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified misc/simulators/storage-overhead.py

    rebfde4f reee70fba  
    22
    33import sys, math
    4 from allmydata import upload, uri, encode, storage
     4from allmydata import uri, storage
     5from allmydata.immutable import upload
     6from allmydata.interfaces import DEFAULT_MAX_SEGMENT_SIZE
    57from allmydata.util import mathutil
    68
     
    2325        return self.fp
    2426
    25 def calc(filesize, params=(3,7,10), segsize=encode.Encoder.MAX_SEGMENT_SIZE):
     27def calc(filesize, params=(3,7,10), segsize=DEFAULT_MAX_SEGMENT_SIZE):
    2628    num_shares = params[2]
    2729    if filesize <= upload.Uploader.URI_LIT_SIZE_THRESHOLD:
    28         urisize = len(uri.pack_lit("A"*filesize))
     30        urisize = len(uri.LiteralFileURI("A"*filesize).to_string())
    2931        sharesize = 0
    3032        sharespace = 0
    3133    else:
    32         u = upload.FileUploader(None)
     34        u = upload.FileUploader(None) # XXX changed
    3335        u.set_params(params)
    3436        # unfortunately, Encoder doesn't currently lend itself to answering
Note: See TracChangeset for help on using the changeset viewer.