-->
Page 1 of 1

Error in file system

PostPosted: Fri Jul 17, 2015 10:36 am
by Nikolay
The test records in Flash.
It writes half the size of a flash
------------------------------------------------
Total : 3396281 bytes
Used : 0 bytes
Remain: 3396281 bytes
------------------------------------------
> dofile('main0.lua')
------------------------------------------
name=x1.txt,E=30000000
TT=5.5,ts=13.2,s=160.04
TT=11.2,ts=13.2,s=320.108
TT=16.8,ts=13.2,s=480.077
TT=22.5,ts=16.5,s=640.162
TT=28.1,ts=16.5,s=800.111
TT=33.8,ts=13.1,s=960.129
TT=39.5,ts=13.2,s=1120.11
TT=45.1,ts=13.2,s=1280.058
TT=50.8,ts=14.1,s=1440.049
TT=56.5,ts=13.1,s=1600.026
HЎЦФф
--------------------------------------------
Total : 3396281 bytes
Used : 1689983 bytes
Remain: 1706298 bytes
--------------------------------------------------------
Test :
--------------------------------
function main0()
local E=30000000; local E1=2;
for m=1,E1 do
local s=0; local n=1; local tt=0; local T2=tmr.now(); T2=tmr.now()-T2;
local name="x1.txt";
print("name="..name..",E="..E);
if file.open(name,"w") then
while E>s do
local str=tostring(math.random ());
local len=string.len(str);
tmr.wdclr()
local TM=tmr.now(); file.write(str); local y=tmr.now()-TM-T2; tt=tt+y;
n=n+1; s=s+len;
if n>10000 then print("TT="..0.1*math.floor(tt/100000)..",ts="..0.1*math.floor(10*y/len)..",s="..(s/1000)); n=1; end
end
end
end
end
main0()

Re: Error in file system

PostPosted: Fri Jul 17, 2015 7:14 pm
by pvvx
No errors:
Code: Select all> dofile("script1.lua");
name=x1.txt,E=30000000
TT=4.4,ts=14.5,s=160.038
TT=9,ts=15.4,s=320.117
TT=13.6,ts=15.5,s=480.091
TT=18.2,ts=15.4,s=640.173
TT=22.8,ts=15.4,s=800.125
TT=27.4,ts=15.4,s=960.137
TT=32,ts=15.4,s=1120.112
TT=36.6,ts=15.4,s=1280.067
TT=41.2,ts=15.4,s=1440.073
TT=45.8,ts=15.4,s=1600.062
TT=50.4,ts=14.5,s=1759.988
TT=54.9,ts=15.5,s=1919.903
TT=59.5,ts=15.5,s=2079.86
TT=64.1,ts=15.5,s=2239.836
TT=68.8,ts=16.5,s=2399.821
TT=73.4,ts=15.4,s=2559.786
TT=78,ts=15.4,s=2719.765
TT=82.6,ts=15.4,s=2879.868
TT=87.2,ts=15.4,s=3039.971
TT=91.8,ts=15.3,s=3200.011
....
----------------------------
script1.lua     : 531 bytes
x1.txt          : 3327963 bytes
----------------------------
Total file(s)   : 2
Total size      : 3328494 bytes

Total : 14932241 bytes
Used  : 3355870 bytes
Remain: 11576371 bytes
> =wifi.sta.rssi()
-34