import assert = require('assert'); import plcAbs = require('../../src/domain/plcAbs'); import plcAbsStat = require('../../src/domain/plcAbsStat'); describe('benchmarking:', ()=>{ let testINAX :plcAbs.PlcAbs; let testDB = 'DB1180'; let testType = 'X'; //only bool or string, else remove ['.'+testLength] from Address let testOffset = 136; let testLength = 4; let testAddress = testType+testOffset+'_'+testLength; let testDBAddress = testDB+'.DB'+testType+testOffset+'.'+testLength; let mnemonic = 'DE'; let absAddress = 'E24.3'; let pointerAddress = 'P#DB2349.DBX2.23CHAR34'; /*it('static normal', function(done){ for(let i = 0; i < 300000; i++){ let testN = plcAbs.PlcAbs.toINAX(absAddress); } done(); }); it('static pointer', function(done){ for(let i = 0; i < 300000; i++){ let testP = plcAbs.PlcAbs.toINAX(pointerAddress); } done(); });*/ it('non static normal', function(done){ for(let i = 0; i < 300000; i++){ let testN = plcAbs.PlcAbs.toINAX(absAddress); } done(); }); it('non static pointer', function(done){ for(let i = 0; i < 300000; i++){ let testP = plcAbs.PlcAbs.toINAX(pointerAddress); } done(); });/* let obj = { prop : 'X', er:'SDASDAD',asd:2345523,sgdfSDg: 'Ssdfaf'}; let tVar = 'X'; let aVar; it('static access', ()=>{ for(let i = 0; i < 300000000; i++){ aVar = tVar; } }); it('non static access', ()=>{ for(let i = 0; i < 300000000; i++){ aVar = obj.prop; } });*/ });