Index: src/ch/BufferSizeDlg.cpp =================================================================== diff -u -r44a2ec5f1eb0a435b56daef42ef5fe3b7a91da0d -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/BufferSizeDlg.cpp (.../BufferSizeDlg.cpp) (revision 44a2ec5f1eb0a435b56daef42ef5fe3b7a91da0d) +++ src/ch/BufferSizeDlg.cpp (.../BufferSizeDlg.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -55,6 +55,9 @@ DDX_Text(pDX, IDC_TWODISKSSIZE_EDIT, m_uiTwoDisksSize); DDX_Check(pDX, IDC_ONLYDEFAULT_CHECK, m_bOnlyDefaultCheck); DDX_Text(pDX, IDC_BUFFERCOUNT_EDIT, m_uiBufferCount); + DDX_Text(pDX, IDC_MAXREADAHEAD_EDIT, m_uiMaxReadAhead); + DDX_Text(pDX, IDC_MAXCONCURRENTREADS_EDIT, m_uiMaxConcurrentReads); + DDX_Text(pDX, IDC_MAXCONCURRENTWRITES_EDIT, m_uiMaxConcurrentWrites); } BEGIN_MESSAGE_MAP(CBufferSizeDlg,ictranslate::CLanguageDialog) @@ -97,6 +100,9 @@ SetLANSize(m_bsSizes.GetLANSize()); m_uiBufferCount = m_bsSizes.GetBufferCount(); m_bOnlyDefaultCheck=m_bsSizes.IsOnlyDefault(); + m_uiMaxReadAhead = m_bsSizes.GetMaxReadAheadBuffers(); + m_uiMaxConcurrentReads = m_bsSizes.GetMaxConcurrentReads(); + m_uiMaxConcurrentWrites = m_bsSizes.GetMaxConcurrentWrites(); // buffer count handling m_ctlBufferCountSpin.SetRange(1, 1000); @@ -212,6 +218,9 @@ m_bsSizes.SetCDSize(m_uiCDROMSize*IndexToValue(m_ctlCDROMMulti.GetCurSel())); m_bsSizes.SetLANSize(m_uiLANSize*IndexToValue(m_ctlLANMulti.GetCurSel())); m_bsSizes.SetBufferCount(m_uiBufferCount); + m_bsSizes.SetMaxReadAheadBuffers(m_uiMaxReadAhead); + m_bsSizes.SetMaxConcurrentReads(m_uiMaxConcurrentReads); + m_bsSizes.SetMaxConcurrentWrites(m_uiMaxConcurrentWrites); CLanguageDialog::OnOK(); } Index: src/ch/BufferSizeDlg.h =================================================================== diff -u -rb26ced3298e3e7e51d91f3ac70b56746786da83b -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/BufferSizeDlg.h (.../BufferSizeDlg.h) (revision b26ced3298e3e7e51d91f3ac70b56746786da83b) +++ src/ch/BufferSizeDlg.h (.../BufferSizeDlg.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -65,6 +65,10 @@ UINT m_uiBufferCount = 0; BOOL m_bOnlyDefaultCheck = TRUE; + unsigned int m_uiMaxReadAhead = 0; + unsigned int m_uiMaxConcurrentReads = 0; + unsigned int m_uiMaxConcurrentWrites = 0; + chcore::TBufferSizes::EBufferType m_eSelectedBuffer; chcore::TBufferSizes m_bsSizes; }; Index: src/ch/CfgProperties.h =================================================================== diff -u -rbaad6054459abaaf69cbfd1ebad8783085160d99 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/CfgProperties.h (.../CfgProperties.h) (revision baad6054459abaaf69cbfd1ebad8783085160d99) +++ src/ch/CfgProperties.h (.../CfgProperties.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -98,6 +98,9 @@ PP_BFUSENOBUFFERING, PP_BFBOUNDARYLIMIT, PP_BFQUEUEDEPTH, + PP_MAXREADAHEAD, + PP_MAXCONCURRENTREADS, + PP_MAXCONCURRENTWRITES, PP_LOGMAXSIZE, PP_LOGROTATECOUNT, @@ -263,6 +266,9 @@ ADAPT_TASK_PROPERTY(PP_BFUSENOBUFFERING, chcore::eTO_DisableBuffering); ADAPT_TASK_PROPERTY(PP_BFBOUNDARYLIMIT, chcore::eTO_DisableBufferingMinSize); ADAPT_TASK_PROPERTY(PP_BFQUEUEDEPTH, chcore::eTO_BufferQueueDepth); +ADAPT_TASK_PROPERTY(PP_MAXREADAHEAD, chcore::eTO_MaxReadAheadBuffers); +ADAPT_TASK_PROPERTY(PP_MAXCONCURRENTREADS, chcore::eTO_MaxConcurrentReads); +ADAPT_TASK_PROPERTY(PP_MAXCONCURRENTWRITES, chcore::eTO_MaxConcurrentWrites); ADAPT_TASK_PROPERTY(PP_CMSETDESTATTRIBUTES, chcore::eTO_SetDestinationAttributes); ADAPT_TASK_PROPERTY(PP_CMPROTECTROFILES, chcore::eTO_ProtectReadOnlyFiles); Index: src/ch/OptionsDlg.cpp =================================================================== diff -u -rbaad6054459abaaf69cbfd1ebad8783085160d99 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision baad6054459abaaf69cbfd1ebad8783085160d99) +++ src/ch/OptionsDlg.cpp (.../OptionsDlg.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -138,30 +138,42 @@ pDlg->GetUintProp(iIndex - iParam + 1), pDlg->GetUintProp(iIndex - iParam + 2), pDlg->GetUintProp(iIndex - iParam + 3), - pDlg->GetUintProp(iIndex - iParam + 4)); + pDlg->GetUintProp(iIndex - iParam + 4), + pDlg->GetUintProp(iIndex - iParam + 8), + pDlg->GetUintProp(iIndex - iParam + 9), + pDlg->GetUintProp(iIndex - iParam + 10)); CBufferSizeDlg dlg(&tBufferSizes, (chcore::TBufferSizes::EBufferType)iParam); if (dlg.DoModal() == IDOK) { tBufferSizes = dlg.GetBufferSizes(); PROPERTYITEM* pItem; - TCHAR xx[32]; + TCHAR szData[32]; pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex-iParam-1)); pItem->nPropertySelected=(tBufferSizes.IsOnlyDefault() ? 1 : 0); pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex-iParam)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetDefaultSize(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetDefaultSize(), szData, 10)); pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex-iParam+1)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetOneDiskSize(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetOneDiskSize(), szData, 10)); pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex-iParam+2)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetTwoDisksSize(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetTwoDisksSize(), szData, 10)); pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex-iParam+3)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetCDSize(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetCDSize(), szData, 10)); pItem = (PROPERTYITEM*) pList->GetAt(pList->FindIndex(iIndex - iParam + 4)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetLANSize(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetLANSize(), szData, 10)); pItem = (PROPERTYITEM*) pList->GetAt(pList->FindIndex(iIndex - iParam + 7)); - pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetBufferCount(), xx, 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetBufferCount(), szData, 10)); + + pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex - iParam + 8)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetMaxReadAheadBuffers(), szData, 10)); + + pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex - iParam + 9)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetMaxConcurrentReads(), szData, 10)); + + pItem = (PROPERTYITEM*)pList->GetAt(pList->FindIndex(iIndex - iParam + 10)); + pItem->csProperties.SetAt(0, _itot(tBufferSizes.GetMaxConcurrentWrites(), szData, 10)); } } @@ -316,6 +328,9 @@ PROP_BOOL(IDS_USENOBUFFERING_STRING, GetPropValue(GetConfig())); PROP_UINT(IDS_LARGEFILESMINSIZE_STRING, GetPropValue(GetConfig())); PROP_UINT(IDS_BUFFER_QUEUE_DEPTH, GetPropValue(GetConfig())); + PROP_UINT(IDS_BUFFER_MAX_READAHEAD, GetPropValue(GetConfig())); + PROP_UINT(IDS_BUFFER_MAX_CONCURRENT_READS, GetPropValue(GetConfig())); + PROP_UINT(IDS_BUFFER_MAX_CONCURRENT_WRITES, GetPropValue(GetConfig())); PROP_SEPARATOR(IDS_CFGLOGFILE_STRING); PROP_UINT(IDS_CFGMAXLIMIT_STRING, GetPropValue(GetConfig())); @@ -442,6 +457,9 @@ SetPropValue(rConfig, GetBoolProp(iPosition++)); SetPropValue(rConfig, GetUintProp(iPosition++)); SetPropValue(rConfig, GetUintProp(iPosition++)); + SetPropValue(GetConfig(), GetUintProp(iPosition++)); + SetPropValue(GetConfig(), GetUintProp(iPosition++)); + SetPropValue(GetConfig(), GetUintProp(iPosition++)); // log file SKIP_SEPARATOR(iPosition); Index: src/ch/ch.rc =================================================================== diff -u -rbaad6054459abaaf69cbfd1ebad8783085160d99 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/ch.rc (.../ch.rc) (revision baad6054459abaaf69cbfd1ebad8783085160d99) +++ src/ch/ch.rc (.../ch.rc) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -40,11 +40,11 @@ ICON "",IDC_IMAGE_STATIC,13,13,20,20,SS_REALSIZEIMAGE CONTROL "Do not show this again",IDC_BASIC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,36,163,10 PUSHBUTTON "",IDC_FIRST_BUTTON,7,49,50,14 - CONTROL "",IDC_MSG_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_READONLY | WS_DISABLED | WS_TABSTOP,43,13,127,20 - CONTROL "",IDC_MEASURE_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,7,7,11,7 + CONTROL "",IDC_MSG_RICHEDIT,"RichEdit20W",WS_DISABLED | WS_TABSTOP | 0x804,43,13,127,20 + CONTROL "",IDC_MEASURE_RICHEDIT,"RichEdit20W",NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP | 0x8c4,7,7,11,7 END -IDD_BUFFERSIZE_DIALOG DIALOGEX 0, 0, 345, 135 +IDD_BUFFERSIZE_DIALOG DIALOGEX 0, 0, 345, 169 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Buffer size settings" FONT 8, "Tahoma", 0, 0, 0x1 @@ -61,21 +61,27 @@ COMBOBOX IDC_LANMULTIPLIER_COMBO,307,52,31,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,0,HIDC_LANMULTIPLIER_COMBO EDITTEXT IDC_BUFFERCOUNT_EDIT,206,82,122,14,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_BUFFERCOUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,327,82,11,14 - CONTROL "Use only default buffer",IDC_ONLYDEFAULT_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,102,331,10,0,HIDC_ONLYDEFAULT_CHECK - DEFPUSHBUTTON "&OK",IDOK,176,114,50,14,0,0,HIDOK - PUSHBUTTON "&Cancel",IDCANCEL,229,114,50,14,0,0,HIDCANCEL - PUSHBUTTON "&Help",IDC_HELP_BUTTON,288,114,50,14,0,0,HIDC_HELP_BUTTON + CONTROL "Use only default buffer",IDC_ONLYDEFAULT_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,132,331,10,0,HIDC_ONLYDEFAULT_CHECK + DEFPUSHBUTTON "&OK",IDOK,176,148,50,14,0,0,0x80890001 + PUSHBUTTON "&Cancel",IDCANCEL,229,148,50,14,0,0,HIDCANCEL + PUSHBUTTON "&Help",IDC_HELP_BUTTON,288,148,50,14,0,0,HIDC_HELP_BUTTON LTEXT "Default",IDC_001_STATIC,35,7,127,8 LTEXT "For copying inside one disk boundary",IDC_002_STATIC,35,38,130,8 LTEXT "For copying between two different disks",IDC_003_STATIC,35,70,132,8 LTEXT "For copying with CD-ROM use",IDC_004_STATIC,207,7,131,8 LTEXT "For copying with network use",IDC_005_STATIC,207,40,131,8 - ICON IDI_CD_ICON,IDC_006_STATIC,179,13,20,20,SS_REALSIZEIMAGE - ICON IDI_NET_ICON,IDC_007_STATIC,179,44,20,20,SS_REALSIZEIMAGE - ICON IDI_HDD_ICON,IDC_008_STATIC,7,43,20,20,SS_REALSIZEIMAGE - ICON IDI_HDD2_ICON,IDC_009_STATIC,7,73,20,20,SS_REALSIZEIMAGE - ICON IDI_TRIBE_ICON,IDC_010_STATIC,7,9,20,20,SS_REALSIZEIMAGE + ICON IDI_CD_ICON,IDC_006_STATIC,179,13,21,20,SS_REALSIZEIMAGE + ICON IDI_NET_ICON,IDC_007_STATIC,179,44,21,20,SS_REALSIZEIMAGE + ICON IDI_HDD_ICON,IDC_008_STATIC,7,43,21,20,SS_REALSIZEIMAGE + ICON IDI_HDD2_ICON,IDC_009_STATIC,7,73,21,20,SS_REALSIZEIMAGE + ICON IDI_TRIBE_ICON,IDC_010_STATIC,7,9,21,20,SS_REALSIZEIMAGE LTEXT "Count of buffers",IDC_011_STATIC,207,70,131,8 + EDITTEXT IDC_MAXREADAHEAD_EDIT,7,112,107,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Max read ahead",IDC_MAXREADAHEAD_STATIC,7,100,102,8 + EDITTEXT IDC_MAXCONCURRENTREADS_EDIT,117,112,107,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Max concurrent reads",IDC_MAXCONCURRENTREADS_STATIC,119,100,104,8 + EDITTEXT IDC_MAXCONCURRENTWRITES_EDIT,231,111,107,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "Max concurrent writes",IDC_MAXCONCURRENTWRITES_STATIC,233,99,104,8 END IDD_FEEDBACK_FILE_ERROR_DIALOG DIALOGEX 0, 0, 283, 112 @@ -107,7 +113,7 @@ CAPTION "Options" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN - DEFPUSHBUTTON "&OK",IDOK,173,193,50,14,0,0,HIDOK + DEFPUSHBUTTON "&OK",IDOK,173,193,50,14,0,0,HIDHELP PUSHBUTTON "&Cancel",IDCANCEL,227,193,50,14,0,0,HIDCANCEL LISTBOX IDC_PROPERTIES_LIST,7,7,383,179,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP,0,HIDC_PROPERTIES_LIST PUSHBUTTON "&Apply",IDC_APPLY_BUTTON,283,193,50,14,0,0,HIDC_APPLY_BUTTON @@ -241,7 +247,7 @@ "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,255,329,10,0,HIDC_IGNOREFOLDERS_CHECK CONTROL "Do not copy/move contents of files - only create it (empty)",IDC_ONLYSTRUCTURE_CHECK, "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,277,329,10,0,HIDC_ONLYSTRUCTURE_CHECK - PUSHBUTTON "&OK",IDOK,186,297,50,14,0,0,HIDOK + PUSHBUTTON "&OK",IDOK,186,297,50,14,0,0,HIDHELP PUSHBUTTON "&Cancel",IDCANCEL,239,297,50,14,0,0,HIDCANCEL LTEXT "Source files/folders:",IDC_001_STATIC,7,7,337,8 LTEXT "Destination folder:",IDC_002_STATIC,7,76,337,8 @@ -299,7 +305,7 @@ CONTROL "Hidden",IDC_HIDDEN_CHECK,"Button",BS_AUTO3STATE | WS_TABSTOP,117,212,68,10,0,HIDC_HIDDEN_CHECK CONTROL "System",IDC_SYSTEM_CHECK,"Button",BS_AUTO3STATE | WS_TABSTOP,117,224,68,10,0,HIDC_SYSTEM_CHECK CONTROL "Directory",IDC_DIRECTORY_CHECK,"Button",BS_AUTO3STATE | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,191,212,93,10,0,HIDC_DIRECTORY_CHECK - DEFPUSHBUTTON "&OK",IDOK,127,245,50,14,0,0,HIDOK + DEFPUSHBUTTON "&OK",IDOK,127,245,50,14,0,0,HIDHELP PUSHBUTTON "&Cancel",IDCANCEL,179,245,50,14,0,0,HIDCANCEL CONTROL "",IDC_001_STATIC,"Static",SS_ETCHEDHORZ,7,238,276,1 PUSHBUTTON "&Help",IDC_HELP_BUTTON,234,245,50,14,0,0,HIDC_HELP_BUTTON @@ -317,7 +323,7 @@ PUSHBUTTON "&Add",IDC_ADD_BUTTON,17,160,50,14,0,0,HIDC_ADD_BUTTON PUSHBUTTON "&Update",IDC_CHANGE_BUTTON,69,160,50,14,0,0,HIDC_CHANGE_BUTTON PUSHBUTTON "&Delete",IDC_DELETE_BUTTON,121,160,50,14,0,0,HIDC_DELETE_BUTTON - DEFPUSHBUTTON "&OK",IDOK,156,185,50,14,0,0,HIDOK + DEFPUSHBUTTON "&OK",IDOK,156,185,50,14,0,0,HIDHELP PUSHBUTTON "&Cancel",IDCANCEL,211,185,50,14,0,0,HIDCANCEL LTEXT "Shortcuts:",IDC_001_STATIC,7,7,311,8 LTEXT "Name:",IDC_002_STATIC,18,126,53,8 @@ -339,7 +345,7 @@ PUSHBUTTON "&Add",IDC_ADD_BUTTON,20,141,50,14,0,0,HIDC_ADD_BUTTON PUSHBUTTON "&Update",IDC_CHANGE_BUTTON,72,141,50,14,0,0,HIDC_CHANGE_BUTTON PUSHBUTTON "&Delete",IDC_DELETE_BUTTON,124,141,50,14,0,0,HIDC_DELETE_BUTTON - DEFPUSHBUTTON "&OK",IDOK,156,169,50,14,0,0,HIDOK + DEFPUSHBUTTON "&OK",IDOK,156,169,50,14,0,0,HIDHELP PUSHBUTTON "&Cancel",IDCANCEL,211,169,50,14,0,0,HIDCANCEL LTEXT "Recently used paths:",IDC_001_STATIC,7,7,311,8 GROUPBOX "Path",IDC_002_STATIC,7,110,311,51 @@ -351,7 +357,7 @@ CAPTION "About ..." FONT 8, "Tahoma", 0, 0, 0x1 BEGIN - DEFPUSHBUTTON "&OK",IDOK,306,143,56,14,WS_GROUP,0,HIDOK + DEFPUSHBUTTON "&OK",IDOK,306,143,56,14,WS_GROUP,0,HIDHELP ICON IDR_MAINFRAME,IDC_STATIC,11,14,20,20 CTEXT "",IDC_COPYRIGHT_STATIC,40,93,322,8 CONTROL "",IDC_HOMEPAGELINK_STATIC,"STATICEX",0x1,208,32,154,8 @@ -391,7 +397,7 @@ LTEXT "Update channel:",IDC_UPDATECHANNEL_STATIC,160,89,138,8 LTEXT "Check for updates:",IDC_CHECKFORUPDATESFREQ_STATIC,7,89,142,8 COMBOBOX IDC_UPDATESFREQ_COMBO,7,101,142,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_CHANGELOG_RICHEDIT,"RichEdit20W",ES_MULTILINE | ES_READONLY | ES_NUMBER | WS_VSCROLL | WS_TABSTOP,51,25,247,56 + CONTROL "",IDC_CHANGELOG_RICHEDIT,"RichEdit20W",WS_VSCROLL | WS_TABSTOP | 0x2804,51,25,247,56 ICON "",IDC_ICON_STATIC,15,15,20,20 CONTROL "Custom1",IDC_MAINUPDATEINFO_CUSTOM,"STATICEX",0x30,47,7,251,14 END @@ -444,7 +450,7 @@ LEFTMARGIN, 7 RIGHTMARGIN, 338 TOPMARGIN, 7 - BOTTOMMARGIN, 128 + BOTTOMMARGIN, 162 END IDD_FEEDBACK_FILE_ERROR_DIALOG, DIALOG @@ -903,6 +909,9 @@ IDS_CFGLOGLEVEL_VALUES "Trace!Debug!Info!Warning!Error!Fatal" IDS_UPDATE_FREQUENCIES "Never!Every startup!Daily!Weekly!Once every 2 weeks!Monthly!Quarterly" IDS_BUFFER_QUEUE_DEPTH "Buffer queue depth" + IDS_BUFFER_MAX_READAHEAD "Maximum read ahead (buffers)" + IDS_BUFFER_MAX_CONCURRENT_READS "Maximum concurrent read requests" + IDS_BUFFER_MAX_CONCURRENT_WRITES "Maximum concurrent write requests" IDS_FASTMOVEBEFOREBLOCK_STRING "Use fast move before blocking" IDS_CFG_USE_SECURE_CONNECTION "Use secure connection when checking for updates" @@ -931,7 +940,8 @@ IDS_MINIVIEWAUTOHIDE_STRING "Hide when empty" IDS_PROCESSINGTHREAD_STRING "Copying/moving thread" IDS_AUTOCOPYREST_STRING "Auto ""copy-rest"" of files" - IDS_SETDESTATTRIB_STRING "Set dates and attributes of destination files and directories" + IDS_SETDESTATTRIB_STRING + "Set dates and attributes of destination files and directories" IDS_PROTECTROFILES_STRING "Protect read-only files" IDS_LIMITOPERATIONS_STRING "Limit maximum operations running simultaneously ..." Index: src/ch/resource.h =================================================================== diff -u -rbaad6054459abaaf69cbfd1ebad8783085160d99 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/ch/resource.h (.../resource.h) (revision baad6054459abaaf69cbfd1ebad8783085160d99) +++ src/ch/resource.h (.../resource.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -261,10 +261,14 @@ #define IDC_TASKPROCESSED_LABEL_STATIC 1229 #define IDC_012_STATIC 1230 #define IDC_GLOBALTRANSFER_LABEL_STATIC 1230 +#define IDC_MAXREADAHEAD_STATIC 1230 #define IDC_013_STATIC 1231 #define IDC_GLOBALPROCESSED_LABEL_STATIC 1231 +#define IDC_MAXCONCURRENTREADS_STATIC 1231 #define IDC_014_STATIC 1232 #define IDC_GLOBALSTATS_LABEL_STATIC 1232 +#define IDC_011_STATIC4 1232 +#define IDC_MAXCONCURRENTWRITES_STATIC 1232 #define IDC_015_STATIC 1233 #define IDC_TASKSTATS_LABEL_STATIC 1233 #define IDC_016_STATIC 1234 @@ -357,7 +361,10 @@ #define IDC_UPDATECHANNEL_COMBO 1325 #define IDC_COMBO2 1326 #define IDC_UPDATESFREQ_COMBO 1326 +#define IDC_MAXREADAHEAD_EDIT 1326 #define IDC_LIST1 1327 +#define IDC_MAXCONCURRENTREADS_EDIT 1327 +#define IDC_MAXCONCURRENTWRITES_EDIT 1328 #define IDC_RICHEDIT21 1329 #define IDC_CHANGELOG_RICHEDIT 1329 #define IDC_MAINUPDATEINFO_CUSTOM 1330 @@ -538,8 +545,11 @@ #define IDS_CFGLOGLEVEL_SUBTASK_SCANDIR 8113 #define IDS_CFGLOGLEVEL_SUBTASK_COPYMOVE 8114 #define IDS_CFGLOGLEVEL_SUBTASK_FASTMOVE 8115 -#define IDS_CFGLOGLEVEL_SUBTASK_DELETE 8116 -#define IDS_CFGLOGLEVEL_FILESYSTEM 8117 +#define IDS_CFGLOGLEVEL_SUBTASK_DELETE 8116 +#define IDS_CFGLOGLEVEL_FILESYSTEM 8117 +#define IDS_BUFFER_MAX_READAHEAD 8118 +#define IDS_BUFFER_MAX_CONCURRENT_READS 8119 +#define IDS_BUFFER_MAX_CONCURRENT_WRITES 8120 #define IDS_MENUCOPY_STRING 9000 #define IDS_MENUMOVE_STRING 9001 #define IDS_MENUCOPYMOVESPECIAL_STRING 9002 Index: src/libchcore/TBufferSizes.cpp =================================================================== diff -u -rd18db617f4727a237c94b59af9b4328f829eda16 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TBufferSizes.cpp (.../TBufferSizes.cpp) (revision d18db617f4727a237c94b59af9b4328f829eda16) +++ src/libchcore/TBufferSizes.cpp (.../TBufferSizes.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -31,18 +31,25 @@ m_uiCDSize(BufferGranularity), m_uiLANSize(BufferGranularity), m_bOnlyDefault(false), - m_uiBufferCount(MinBufferCount) + m_uiBufferCount(MinBufferCount), + m_uiMaxReadAheadBuffers(MinReadAhead), + m_uiMaxConcurrentReads(MinConcurrentReads), + m_uiMaxConcurrentWrites(MinConcurrentWrites) { } - TBufferSizes::TBufferSizes(bool bOnlyDefault, UINT uiBufferCount, UINT uiDefaultSize, UINT uiOneDiskSize, UINT uiTwoDisksSize, UINT uiCDSize, UINT uiLANSize) : + TBufferSizes::TBufferSizes(bool bOnlyDefault, unsigned int uiBufferCount, unsigned int uiDefaultSize, unsigned int uiOneDiskSize, unsigned int uiTwoDisksSize, unsigned int uiCDSize, unsigned int uiLANSize, + unsigned int uiMaxReadAheadBuffers, unsigned int uiMaxConcurrentReads, unsigned int uiMaxConcurrentWrites) : m_uiDefaultSize(std::max(BufferGranularity, RoundUp(uiDefaultSize, BufferGranularity))), m_uiOneDiskSize(std::max(BufferGranularity, RoundUp(uiOneDiskSize, BufferGranularity))), m_uiTwoDisksSize(std::max(BufferGranularity, RoundUp(uiTwoDisksSize, BufferGranularity))), m_uiCDSize(std::max(BufferGranularity, RoundUp(uiCDSize, BufferGranularity))), m_uiLANSize(std::max(BufferGranularity, RoundUp(uiLANSize, BufferGranularity))), m_bOnlyDefault(bOnlyDefault), - m_uiBufferCount(std::max(uiBufferCount, MinBufferCount)) + m_uiBufferCount(std::max(uiBufferCount, MinBufferCount)), + m_uiMaxReadAheadBuffers(std::max(uiMaxReadAheadBuffers, MinReadAhead)), + m_uiMaxConcurrentReads(std::max(uiMaxConcurrentReads, MinConcurrentReads)), + m_uiMaxConcurrentWrites(std::max(uiMaxConcurrentWrites, MinConcurrentWrites)) { } @@ -55,9 +62,12 @@ m_uiLANSize = BufferGranularity; m_bOnlyDefault = false; m_uiBufferCount = MinBufferCount; + m_uiMaxReadAheadBuffers = MinReadAhead; + m_uiMaxConcurrentReads = MinConcurrentReads; + m_uiMaxConcurrentWrites = MinConcurrentWrites; } - UINT TBufferSizes::GetSizeByType(EBufferType eType) const + unsigned int TBufferSizes::GetSizeByType(EBufferType eType) const { switch (eType) { @@ -76,7 +86,7 @@ } } - void TBufferSizes::SetSizeByType(EBufferType eType, UINT uiSize) + void TBufferSizes::SetSizeByType(EBufferType eType, unsigned int uiSize) { switch (eType) { @@ -100,37 +110,37 @@ } } - void TBufferSizes::SetDefaultSize(UINT uiSize) + void TBufferSizes::SetDefaultSize(unsigned int uiSize) { m_uiDefaultSize = std::max(BufferGranularity, RoundUp(uiSize, BufferGranularity)); } - void TBufferSizes::SetOneDiskSize(UINT uiSize) + void TBufferSizes::SetOneDiskSize(unsigned int uiSize) { m_uiOneDiskSize = std::max(BufferGranularity, RoundUp(uiSize, BufferGranularity)); } - void TBufferSizes::SetTwoDisksSize(UINT uiSize) + void TBufferSizes::SetTwoDisksSize(unsigned int uiSize) { m_uiTwoDisksSize = std::max(BufferGranularity, RoundUp(uiSize, BufferGranularity)); } - void TBufferSizes::SetCDSize(UINT uiSize) + void TBufferSizes::SetCDSize(unsigned int uiSize) { m_uiCDSize = std::max(BufferGranularity, RoundUp(uiSize, BufferGranularity)); } - void TBufferSizes::SetLANSize(UINT uiSize) + void TBufferSizes::SetLANSize(unsigned int uiSize) { m_uiLANSize = std::max(BufferGranularity, RoundUp(uiSize, BufferGranularity)); } - void TBufferSizes::SetBufferCount(UINT uiBufferCount) + void TBufferSizes::SetBufferCount(unsigned int uiBufferCount) { m_uiBufferCount = std::max(uiBufferCount, MinBufferCount); } - UINT TBufferSizes::GetMaxSize() const + unsigned int TBufferSizes::GetMaxSize() const { if (m_bOnlyDefault) return m_uiDefaultSize; Index: src/libchcore/TBufferSizes.h =================================================================== diff -u -re96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TBufferSizes.h (.../TBufferSizes.h) (revision e96806b7f8ff7ca7e9f4afbea603e6351a3dc3e3) +++ src/libchcore/TBufferSizes.h (.../TBufferSizes.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -40,45 +40,62 @@ static const unsigned int BufferGranularity = 4096; static const unsigned int MinBufferCount = 1; + static const unsigned int MinReadAhead = 1; + static const unsigned int MinConcurrentReads = 1; + static const unsigned int MinConcurrentWrites = 1; public: TBufferSizes(); - TBufferSizes(bool bOnlyDefault, UINT uiBufferCount, UINT uiDefaultSize, - UINT uiOneDiskSize, UINT uiTwoDisksSize, UINT uiCDSize, UINT uiLANSize); + TBufferSizes(bool bOnlyDefault, unsigned int uiBufferCount, unsigned int uiDefaultSize, + unsigned int uiOneDiskSize, unsigned int uiTwoDisksSize, unsigned int uiCDSize, unsigned int uiLANSize, + unsigned int uiMaxReadAheadBuffers, unsigned int uiMaxConcurrentReads, unsigned int uiMaxConcurrentWrites); void Clear(); bool IsOnlyDefault() const { return m_bOnlyDefault; } - UINT GetDefaultSize() const { return m_uiDefaultSize; } - UINT GetOneDiskSize() const { return m_uiOneDiskSize; } - UINT GetTwoDisksSize() const { return m_uiTwoDisksSize; } - UINT GetCDSize() const { return m_uiCDSize; } - UINT GetLANSize() const { return m_uiLANSize; } + unsigned int GetDefaultSize() const { return m_uiDefaultSize; } + unsigned int GetOneDiskSize() const { return m_uiOneDiskSize; } + unsigned int GetTwoDisksSize() const { return m_uiTwoDisksSize; } + unsigned int GetCDSize() const { return m_uiCDSize; } + unsigned int GetLANSize() const { return m_uiLANSize; } void SetOnlyDefault(bool bOnlyDefault) { m_bOnlyDefault = bOnlyDefault; } - void SetDefaultSize(UINT uiSize); - void SetOneDiskSize(UINT uiSize); - void SetTwoDisksSize(UINT uiSize); - void SetCDSize(UINT uiSize); - void SetLANSize(UINT uiSize); + void SetDefaultSize(unsigned int uiSize); + void SetOneDiskSize(unsigned int uiSize); + void SetTwoDisksSize(unsigned int uiSize); + void SetCDSize(unsigned int uiSize); + void SetLANSize(unsigned int uiSize); - UINT GetBufferCount() const { return m_uiBufferCount; } - void SetBufferCount(UINT uiBufferCount); + unsigned int GetBufferCount() const { return m_uiBufferCount; } + void SetBufferCount(unsigned int uiBufferCount); - UINT GetSizeByType(EBufferType eType) const; - void SetSizeByType(EBufferType eType, UINT uiSize); + unsigned int GetSizeByType(EBufferType eType) const; + void SetSizeByType(EBufferType eType, unsigned int uiSize); - UINT GetMaxSize() const; + unsigned int GetMaxReadAheadBuffers() const { return m_uiMaxReadAheadBuffers; } + void SetMaxReadAheadBuffers(unsigned int uiMaxReadAhead) { m_uiMaxReadAheadBuffers = uiMaxReadAhead; } + unsigned int GetMaxConcurrentReads() const { return m_uiMaxConcurrentReads; } + void SetMaxConcurrentReads(unsigned int uiMaxConcurrentReads) { m_uiMaxConcurrentReads = uiMaxConcurrentReads; } + + unsigned int GetMaxConcurrentWrites() const { return m_uiMaxConcurrentWrites; } + void SetMaxConcurrentWrites(unsigned int uiMaxConcurrentWrites) { m_uiMaxConcurrentWrites = uiMaxConcurrentWrites; } + + unsigned int GetMaxSize() const; + private: - UINT m_uiDefaultSize; - UINT m_uiOneDiskSize; - UINT m_uiTwoDisksSize; - UINT m_uiCDSize; - UINT m_uiLANSize; + unsigned int m_uiDefaultSize = 0; + unsigned int m_uiOneDiskSize = 0; + unsigned int m_uiTwoDisksSize = 0; + unsigned int m_uiCDSize = 0; + unsigned int m_uiLANSize = 0; - bool m_bOnlyDefault; - UINT m_uiBufferCount; + bool m_bOnlyDefault = false; + unsigned int m_uiBufferCount = 0; + + unsigned int m_uiMaxReadAheadBuffers = 0; + unsigned int m_uiMaxConcurrentReads = 0; + unsigned int m_uiMaxConcurrentWrites = 0; }; } Index: src/libchcore/TOverlappedReaderWriterFB.cpp =================================================================== diff -u -rd99302fce795dbb5139659016a5da7948f141fb4 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TOverlappedReaderWriterFB.cpp (.../TOverlappedReaderWriterFB.cpp) (revision d99302fce795dbb5139659016a5da7948f141fb4) +++ src/libchcore/TOverlappedReaderWriterFB.cpp (.../TOverlappedReaderWriterFB.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -37,6 +37,9 @@ const TOverlappedMemoryPoolPtr& spMemoryPool, unsigned long long ullResumePosition, DWORD dwChunkSize, + unsigned int uiMaxReadAhead, + unsigned int uiMaxConcurrentReads, + unsigned int uiMaxConcurrentWrites, bool bNoBuffering, bool bProtectReadOnlyFiles, bool bOnlyCreate, @@ -47,8 +50,8 @@ m_rThreadController(rThreadController), m_spRange(std::make_shared(ullResumePosition)), m_spMemoryPool(spMemoryPool), - m_spReader(std::make_shared(spFilesystem, spFeedbackHandler, rThreadController, spStats, spSrcFileInfo, spLogFileData, spMemoryPool ? spMemoryPool->GetBufferList() : TBufferListPtr(), m_spRange, dwChunkSize, MaxOtfBuffers, MaxReadAheadBuffers, bNoBuffering, bProtectReadOnlyFiles)), - m_spWriter(std::make_shared(spFilesystem, spFeedbackHandler, rThreadController, spStats, spSrcFileInfo, pathDst, spLogFileData, m_spReader->GetFinishedQueue(), m_spRange, spMemoryPool ? spMemoryPool->GetBufferList() : TBufferListPtr(), MaxOtfBuffers, bOnlyCreate, bNoBuffering, bProtectReadOnlyFiles, bUpdateFileAttributesAndTimes)) + m_spReader(std::make_shared(spFilesystem, spFeedbackHandler, rThreadController, spStats, spSrcFileInfo, spLogFileData, spMemoryPool ? spMemoryPool->GetBufferList() : TBufferListPtr(), m_spRange, dwChunkSize, uiMaxConcurrentReads, uiMaxReadAhead, bNoBuffering, bProtectReadOnlyFiles)), + m_spWriter(std::make_shared(spFilesystem, spFeedbackHandler, rThreadController, spStats, spSrcFileInfo, pathDst, spLogFileData, m_spReader->GetFinishedQueue(), m_spRange, spMemoryPool ? spMemoryPool->GetBufferList() : TBufferListPtr(), uiMaxConcurrentWrites, bOnlyCreate, bNoBuffering, bProtectReadOnlyFiles, bUpdateFileAttributesAndTimes)) { } Index: src/libchcore/TOverlappedReaderWriterFB.h =================================================================== diff -u -rd99302fce795dbb5139659016a5da7948f141fb4 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TOverlappedReaderWriterFB.h (.../TOverlappedReaderWriterFB.h) (revision d99302fce795dbb5139659016a5da7948f141fb4) +++ src/libchcore/TOverlappedReaderWriterFB.h (.../TOverlappedReaderWriterFB.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -32,10 +32,6 @@ class TOverlappedReaderWriterFB { public: - static const size_t MaxOtfBuffers = 2; - static const size_t MaxReadAheadBuffers = 50; - - public: explicit TOverlappedReaderWriterFB(const IFilesystemPtr& spFilesystem, const IFeedbackHandlerPtr& spFeedbackHandler, TWorkerThreadController& rThreadController, @@ -47,6 +43,9 @@ const TOverlappedMemoryPoolPtr& spBuffers, unsigned long long ullResumePosition, DWORD dwChunkSize, + unsigned int uiMaxReadAhead, + unsigned int uiMaxConcurrentReads, + unsigned int uiMaxConcurrentWrites, bool bNoBuffering, bool bProtectReadOnlyFiles, bool bOnlyCreate, Index: src/libchcore/TSubTaskCopyMove.cpp =================================================================== diff -u -rd9527df01ee91b35d9a5fdccb80ded25a9c8265f -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision d9527df01ee91b35d9a5fdccb80ded25a9c8265f) +++ src/libchcore/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -377,6 +377,9 @@ pData->spMemoryPool, ullNextReadPos, dwCurrentBufferSize, + pData->tBufferSizes.GetMaxReadAheadBuffers(), + pData->tBufferSizes.GetMaxConcurrentReads(), + pData->tBufferSizes.GetMaxConcurrentWrites(), bNoBuffer, GetTaskPropValue(rConfig), pData->bOnlyCreate, @@ -402,18 +405,16 @@ rBufferSizes = GetTaskPropBufferSizes(rConfig); // log - TString strFormat; - strFormat = _T("Changing buffer size to [Def:%defsize2, One:%onesize2, Two:%twosize2, CD:%cdsize2, LAN:%lansize2, Count:%cnt]"); + LOG_INFO(m_spLog) << L"Changing buffer sizes. Default: " << rBufferSizes.GetDefaultSize() << + L", OneDisk: " << rBufferSizes.GetOneDiskSize() << + L", TwoDisks: " << rBufferSizes.GetTwoDisksSize() << + L", CD: " << rBufferSizes.GetCDSize() << + L", LAN: " << rBufferSizes.GetLANSize() << + L", MaxBuffers: " << rBufferSizes.GetBufferCount() << + L", MaxReadAhead: " << rBufferSizes.GetMaxReadAheadBuffers() << + L", MaxConcurrentReads: " << rBufferSizes.GetMaxConcurrentReads() << + L", MaxConcurrentWrites: " << rBufferSizes.GetMaxConcurrentWrites(); - strFormat.Replace(_T("%defsize2"), boost::lexical_cast(rBufferSizes.GetDefaultSize()).c_str()); - strFormat.Replace(_T("%onesize2"), boost::lexical_cast(rBufferSizes.GetOneDiskSize()).c_str()); - strFormat.Replace(_T("%twosize2"), boost::lexical_cast(rBufferSizes.GetTwoDisksSize()).c_str()); - strFormat.Replace(_T("%cdsize2"), boost::lexical_cast(rBufferSizes.GetCDSize()).c_str()); - strFormat.Replace(_T("%lansize2"), boost::lexical_cast(rBufferSizes.GetLANSize()).c_str()); - strFormat.Replace(_T("%cnt"), boost::lexical_cast(rBufferSizes.GetBufferCount()).c_str()); - - LOG_INFO(m_spLog) << strFormat.c_str(); - spBuffer->ReinitializeBuffers(rBufferSizes.GetBufferCount(), rBufferSizes.GetMaxSize()); return true; // buffer adjusted Index: src/libchcore/TTaskConfigBufferSizes.cpp =================================================================== diff -u -rd9527df01ee91b35d9a5fdccb80ded25a9c8265f -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TTaskConfigBufferSizes.cpp (.../TTaskConfigBufferSizes.cpp) (revision d9527df01ee91b35d9a5fdccb80ded25a9c8265f) +++ src/libchcore/TTaskConfigBufferSizes.cpp (.../TTaskConfigBufferSizes.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -30,7 +30,11 @@ GetTaskPropValue(rConfig), GetTaskPropValue(rConfig), GetTaskPropValue(rConfig), - GetTaskPropValue(rConfig)); + GetTaskPropValue(rConfig), + GetTaskPropValue(rConfig), + GetTaskPropValue(rConfig), + GetTaskPropValue(rConfig) + ); } void SetTaskPropBufferSizes(TConfig& rConfig, const TBufferSizes& rBufferSizes) @@ -42,5 +46,8 @@ SetTaskPropValue(rConfig, rBufferSizes.GetTwoDisksSize()); SetTaskPropValue(rConfig, rBufferSizes.GetCDSize()); SetTaskPropValue(rConfig, rBufferSizes.GetLANSize()); + SetTaskPropValue(rConfig, rBufferSizes.GetMaxReadAheadBuffers()); + SetTaskPropValue(rConfig, rBufferSizes.GetMaxConcurrentReads()); + SetTaskPropValue(rConfig, rBufferSizes.GetMaxConcurrentWrites()); } } Index: src/libchcore/TTaskConfiguration.h =================================================================== diff -u -rbaad6054459abaaf69cbfd1ebad8783085160d99 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision baad6054459abaaf69cbfd1ebad8783085160d99) +++ src/libchcore/TTaskConfiguration.h (.../TTaskConfiguration.h) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -38,6 +38,9 @@ eTO_DisableBuffering, eTO_DisableBufferingMinSize, eTO_BufferQueueDepth, + eTO_MaxReadAheadBuffers, + eTO_MaxConcurrentReads, + eTO_MaxConcurrentWrites, eTO_FeedbackGeneralFileError, eTO_FeedbackFileAlreadyExists, @@ -115,6 +118,9 @@ TASK_PROPERTY_MIN(eTO_CDBufferSize, unsigned int, _T("Buffer.CDSize"), 131072, 1); TASK_PROPERTY_MIN(eTO_LANBufferSize, unsigned int, _T("Buffer.LANSize"), 131072, 1); TASK_PROPERTY_MINMAX(eTO_BufferQueueDepth, unsigned int, _T("Buffer.QueueDepth"), 8, 1, 1000); + TASK_PROPERTY_MINMAX(eTO_MaxReadAheadBuffers, unsigned int, _T("Buffer.MaxReadAhead"), 10, 1, 1000); + TASK_PROPERTY_MINMAX(eTO_MaxConcurrentReads, unsigned int, _T("Buffer.MaxConcurrentReads"), 2, 1, 1000); + TASK_PROPERTY_MINMAX(eTO_MaxConcurrentWrites, unsigned int, _T("Buffer.MaxConcurrentWrites"), 2, 1, 1000); TASK_PROPERTY(eTO_DisableBuffering, bool, _T("Operation.Buffering.DisableBufferingForLargeFiles"), true); TASK_PROPERTY_MIN(eTO_DisableBufferingMinSize, int, _T("Operation.Buffering.MinSizeOfFileToDisableBuffering"), 0, 1); Index: src/libchcore/Tests/TestsTBufferSizes.cpp =================================================================== diff -u -ra4635addad389b9e117679437a3e1b64a739ea96 -r5aac942a83e4a308ff401cca43be501b1bbdfb6a --- src/libchcore/Tests/TestsTBufferSizes.cpp (.../TestsTBufferSizes.cpp) (revision a4635addad389b9e117679437a3e1b64a739ea96) +++ src/libchcore/Tests/TestsTBufferSizes.cpp (.../TestsTBufferSizes.cpp) (revision 5aac942a83e4a308ff401cca43be501b1bbdfb6a) @@ -21,7 +21,7 @@ TEST(TestsTBufferSizes, ParametrizedConstructor_RoundedValues) { - TBufferSizes tSizes(true, 2, 4096, 8192, 16384, 32768, 65536); + TBufferSizes tSizes(true, 2, 4096, 8192, 16384, 32768, 65536, 10, 2, 1); EXPECT_EQ(2, tSizes.GetBufferCount()); EXPECT_EQ(4096, tSizes.GetDefaultSize()); @@ -30,11 +30,14 @@ EXPECT_EQ(32768, tSizes.GetCDSize()); EXPECT_EQ(65536, tSizes.GetLANSize()); EXPECT_EQ(true, tSizes.IsOnlyDefault()); + EXPECT_EQ(10, tSizes.GetMaxReadAheadBuffers()); + EXPECT_EQ(2, tSizes.GetMaxConcurrentReads()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentWrites()); } TEST(TestsTBufferSizes, ParametrizedConstructor_MinimumCheck) { - TBufferSizes tSizes(true, 0, 0, 0, 0, 0, 0); + TBufferSizes tSizes(true, 0, 0, 0, 0, 0, 0, 0, 0, 0); EXPECT_EQ(TBufferSizes::MinBufferCount, tSizes.GetBufferCount()); EXPECT_EQ(TBufferSizes::BufferGranularity, tSizes.GetDefaultSize()); @@ -43,11 +46,14 @@ EXPECT_EQ(TBufferSizes::BufferGranularity, tSizes.GetCDSize()); EXPECT_EQ(TBufferSizes::BufferGranularity, tSizes.GetLANSize()); EXPECT_EQ(true, tSizes.IsOnlyDefault()); + EXPECT_EQ(1, tSizes.GetMaxReadAheadBuffers()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentReads()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentWrites()); } TEST(TestsTBufferSizes, ParametrizedConstructor_RoundingCheck) { - TBufferSizes tSizes(true, 2, 6543, 9891, 17123, 37012, 72089); + TBufferSizes tSizes(true, 2, 6543, 9891, 17123, 37012, 72089, 10, 2, 1); EXPECT_EQ(2, tSizes.GetBufferCount()); EXPECT_EQ(8192, tSizes.GetDefaultSize()); @@ -56,11 +62,14 @@ EXPECT_EQ(40960, tSizes.GetCDSize()); EXPECT_EQ(73728, tSizes.GetLANSize()); EXPECT_EQ(true, tSizes.IsOnlyDefault()); + EXPECT_EQ(10, tSizes.GetMaxReadAheadBuffers()); + EXPECT_EQ(2, tSizes.GetMaxConcurrentReads()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentWrites()); } TEST(TestsTBufferSizes, Clear) { - TBufferSizes tSizes(true, 2, 6543, 9891, 17123, 37012, 72089); + TBufferSizes tSizes(true, 2, 6543, 9891, 17123, 37012, 72089, 10, 2, 1); tSizes.Clear(); @@ -71,6 +80,9 @@ EXPECT_EQ(TBufferSizes::BufferGranularity, tSizes.GetCDSize()); EXPECT_EQ(TBufferSizes::BufferGranularity, tSizes.GetLANSize()); EXPECT_EQ(false, tSizes.IsOnlyDefault()); + EXPECT_EQ(1, tSizes.GetMaxReadAheadBuffers()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentReads()); + EXPECT_EQ(1, tSizes.GetMaxConcurrentWrites()); } TEST(TestsTBufferSizes, SetOnlyDefault_IsOnlyDefault) @@ -303,42 +315,42 @@ //////////////////////////////////////////////////////////////////////////////////////////////// TEST(TestsTBufferSizes, GetMaxSize_Default) { - TBufferSizes tSizes(false, 1, 16384, 0, 0, 0, 0); + TBufferSizes tSizes(false, 1, 16384, 0, 0, 0, 0, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); } TEST(TestsTBufferSizes, GetMaxSize_OneDisk) { - TBufferSizes tSizes(false, 1, 0, 16384, 0, 0, 0); + TBufferSizes tSizes(false, 1, 0, 16384, 0, 0, 0, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); } TEST(TestsTBufferSizes, GetMaxSize_TwoDisks) { - TBufferSizes tSizes(false, 1, 0, 0, 16384, 0, 0); + TBufferSizes tSizes(false, 1, 0, 0, 16384, 0, 0, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); } TEST(TestsTBufferSizes, GetMaxSize_CD) { - TBufferSizes tSizes(false, 1, 0, 0, 0, 16384, 0); + TBufferSizes tSizes(false, 1, 0, 0, 0, 16384, 0, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); } TEST(TestsTBufferSizes, GetMaxSize_LAN) { - TBufferSizes tSizes(false, 1, 0, 0, 0, 0, 16384); + TBufferSizes tSizes(false, 1, 0, 0, 0, 0, 16384, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); } TEST(TestsTBufferSizes, GetMaxSize_OnlyDefault) { - TBufferSizes tSizes(true, 1, 16384, 0, 0, 0, 32768); + TBufferSizes tSizes(true, 1, 16384, 0, 0, 0, 32768, 0, 0, 0); EXPECT_EQ(16384, tSizes.GetMaxSize()); }