Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-05-19 07:20:22

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import argparse
0004 
0005 parser = argparse.ArgumentParser(description="Test storage proxies")
0006 parser.add_argument("--trace", action="store_true", help="Enable StorageTraceProxy")
0007 parser.add_argument("--latencyRead", action="store_true", help="Add read latency")
0008 parser.add_argument("--latencyWrite", action="store_true", help="Add write latency")
0009 args = parser.parse_args()
0010 
0011 process = cms.Process("TEST")
0012 
0013 process.source = cms.Source("PoolSource",
0014     fileNames = cms.untracked.vstring("file:test.root")
0015 )
0016 
0017 process.out = cms.OutputModule("PoolOutputModule", fileName = cms.untracked.string("output.root"))
0018 
0019 adaptor = cms.Service("AdaptorConfig", storageProxies = cms.untracked.VPSet())
0020 if args.latencyRead:
0021     adaptor.storageProxies.append(cms.PSet(
0022         type = cms.untracked.string("StorageAddLatencyProxy"),
0023         read = cms.untracked.uint32(100),
0024         readv = cms.untracked.uint32(100),
0025     ))
0026 if args.latencyWrite:
0027     adaptor.storageProxies.append(cms.PSet(
0028         type = cms.untracked.string("StorageAddLatencyProxy"),
0029         write = cms.untracked.uint32(100),
0030         writev = cms.untracked.uint32(100),
0031     ))
0032 if args.trace:
0033     adaptor.storageProxies.append(cms.PSet(
0034         type = cms.untracked.string("StorageTracerProxy"),
0035         traceFilePattern = cms.untracked.string("trace_%I.txt"),
0036     ))
0037 
0038 process.add_(adaptor)
0039 
0040 process.ep = cms.EndPath(process.out)