Changeset 132 for oup/current/Helper
- Timestamp:
- Mar 28, 2007, 3:41:10 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Helper/LevelDB.pas
r131 r132 66 66 Stream_Dat, Stream_Raw, Stream_Sep: TFileStream; 67 67 68 // Data, rawdata: Tdata;69 68 BeginTime, FileTime: Double; 70 69 Step: Integer; 71 // rawlist: TRawDataList;72 // datlinks: TDatLinks;73 70 OniImage: TOniImage; 74 71 LevelID: Integer; … … 91 88 92 89 DatFileStream, RawFileStream: TMemoryStream; 90 91 // ########################### 92 datsum, linksum, rawsum: Int64; 93 freq: Int64; 94 tempticks1, tempticks2: Int64; 95 // ########################### 93 96 const 94 97 Steps: Byte = 3; … … 281 284 Application.ProcessMessages; 282 285 286 QueryPerformanceFrequency(freq); 287 datsum := 0; 288 linksum := 0; 289 rawsum := 0; 290 283 291 FileTime := Time; 284 292 for FileID := 0 to DatHeader.Files - 1 do … … 289 297 if FileInfo.Size > 0 then 290 298 begin 299 QueryPerformanceCounter(tempticks1); 300 291 301 FilesHeader[FileID].DataAddr := Stream_Body.Size + 8; 292 302 DatFileStream := TMemoryStream.Create; … … 294 304 DatFileStream.Seek(4, soFromBeginning); 295 305 DatFileStream.Write(LevelID, 4); 306 307 QueryPerformanceCounter(tempticks2); 308 datsum := datsum + (tempticks2 - tempticks1); 296 309 297 310 DatLinks := Connection.GetDatLinks(FileID); … … 308 321 end; 309 322 end; 323 324 QueryPerformanceCounter(tempticks1); 325 linksum := linksum + (tempticks1 - tempticks2); 310 326 311 327 RawLinks := Connection.GetRawList(FileID); … … 335 351 DatFileStream.Seek(0, soFromBeginning); 336 352 Stream_Body.CopyFrom(DatFileStream, DatFileStream.Size); 353 354 QueryPerformanceCounter(tempticks2); 355 rawsum := rawsum + (tempticks2 - tempticks1); 337 356 end 338 357 else … … 356 375 Application.ProcessMessages; 357 376 end; 377 378 ShowMessage('AvgDats: ' + FloatToStr((datsum / progress.Max) / freq) + #13#10 + 379 'AvgLinks: ' + FloatToStr((linksum / progress.Max) / freq) + #13#10 + 380 'AvgRaws: ' + FloatToStr((rawsum / progress.Max) / freq) 381 ); 358 382 359 383 Stream_Dat.Write(DatHeader, SizeOf(DatHeader));
Note:
See TracChangeset
for help on using the changeset viewer.