new IO profiles and CTRL+P handler

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

new IO profiles and CTRL+P handler

salvatore ventura
Hi,
 these three patches apply to files:
 * AccessSpecList.cpp
 * PageDisk.h
 * PageDisk.cpp

 and do the following:
 - add predefined IO profiles as
   - 64KB
   - 2 MB
   - Rename "All in one" to "All in one - no 64K/2MB"

 - add support to handle CTRL+P keyboard accelerator
   on the PageDisk list, which will select all the
   Physical Disks. This in addition to the existing
   CTRL+A which selects *all* the devices, and this
   enhancement is for automation purposes.

 All the patch files were done against the latest released
 version, even though there has been no development on them
 since release date.

 If any question, feel free to contact me.

 thx,
 .salvo
 

worth a visit...
======================================
http://guidamadrid.altervista.org
http://www.worldbuildingservice.com


               
___________________________________
Yahoo! Messenger: chiamate gratuite in tutto il mondo
http://it.beta.messenger.yahoo.com
56c56,61
< /* ##  Changes ...: 2004-04-24 ([hidden email])             ## */
---
> /* ##  Changes ...:  ## */
> /* ## 2005-09-08 ([hidden email])  ## */
> /* ##               - Added 64K and 2MB profiles, not included in         ## */
> /* ##                 the All-in-one.  ## */
> /* ##               - Renamed "All in one" to "All in one - no 64K/2M"    ## */
> /* ## 2004-04-24 ([hidden email])             ## */
371a377,492

>
> // 65536 Bytes / 64 Kilo Bytes
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 65536;
> spec->access[0].reads   = 100;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "64K; 75%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 65536;
> spec->access[0].reads   = 75;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 65536;
> spec->access[0].reads   = 50;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "64K; 25%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 65536;
> spec->access[0].reads   = 25;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 65536;
> spec->access[0].reads   = 0;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
>
> // 2097152 Bytes / 2 Mega Bytes
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "2M; 100%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 2097152;
> spec->access[0].reads   = 100;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "2M; 75%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 2097152;
> spec->access[0].reads   = 75;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 2097152;
> spec->access[0].reads   = 50;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "2M; 25%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 2097152;
> spec->access[0].reads   = 25;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
> spec = New();
> _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%% random" );
> spec->access[0].of_size = 100;
> spec->access[0].size = 2097152;
> spec->access[0].reads   = 0;
> spec->access[0].random = 0;
> spec->access[0].delay = 0;
> spec->access[0].burst = 1;
> spec->access[0].align = 0;
> spec->access[0].reply = 0;
>
375c496
< _snprintf( spec->name, MAX_NAME, "All in one" );
---
> _snprintf( spec->name, MAX_NAME, "All in one - no 64K/2M" );

53c53,61
< /* ##  Changes ...: 2003-10-17 ([hidden email])             ## */
---
> /* ##  Changes ...: 2005-09-08 ([hidden email])                ## */
> /* ##            - Added CPageDisk::SetAllCheckByType, to allow        ## */
> /* ##                 disk selection based on type.                       ## */
> /* ##               - In KeyMultiSel:                                     ## */
> /* ##                 - Added ShowTargets() before the SetAllCheck to     ## */
> /* ## reset the list when using the Keyboard accelerator## */
> /* ##      - Added case 'P', to select only PhysicalDiskType   ## */
> /* ##                   targets.                                          ## */
> /* ##   2003-10-17 ([hidden email])             ## */
738a747,781

> //
> // Sets all the interface's check box to the specified state.
> // but only for specified disktype
> //
> void CPageDisk::SetAllCheckByType( TargetSelType selection , TargetType disktype)
> {
> HTREEITEM hdisk;
> int i, iface_count;
> Manager *manager;
> Target_Spec *disk;
>
>
> hdisk = m_TTargets.GetRootItem();
>
> manager = theApp.pView->m_pWorkerView->GetSelectedManager();
> if ( !manager )
> return;
>
> iface_count = manager->InterfaceCount( GenericDiskType );
> for ( i = 0; i < iface_count; i++ )
> {
> //
> disk = manager->GetInterface( i, GenericDiskType );
> if ( disk->type == disktype )
> {
> SetSelectionCheck( hdisk, selection );
> }
>
> hdisk = m_TTargets.GetNextSiblingItem( hdisk );
> }
> }
>
>
>
>
1046a1090
> // Clear the target list first, then Select All the targets
1048a1093
> ShowTargets();
1051a1097,1106

> break;
> case 'P':
> // Clear the target list first, then Select All the targets
> // that match the "PhysicalDiskType"
> if ( control )
> {
> ShowTargets();
> SetAllCheckByType( TargetChecked , PhysicalDiskType);
> StoreTargetSelection();
> }

53c53,56
< /* ##  Changes ...: 2003-10-17 ([hidden email])             ## */
---
> /* ##  Changes ...: 2005-09-08 ([hidden email])                ## */
> /* ##            - Added CPageDisk::SetAllCheckByType, to allow        ## */
> /* ##                 disk selection based on type.                       ## */
> /* ##               2003-10-17 ([hidden email])             ## */
119a123
> void SetAllCheckByType( TargetSelType selection , TargetType disktype );
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: new IO profiles and CTRL+P handler

Ming Zhang
Hi Salvo

Thanks a lot.

Could you resend them by using "diff -Nura <old> <new>"?

Thanks

Ming



On Tue, 2005-09-13 at 02:14 +0200, salvatore ventura wrote:

> Hi,
>  these three patches apply to files:
>  * AccessSpecList.cpp
>  * PageDisk.h
>  * PageDisk.cpp
>
>  and do the following:
>  - add predefined IO profiles as
>    - 64KB
>    - 2 MB
>    - Rename "All in one" to "All in one - no 64K/2MB"
>
>  - add support to handle CTRL+P keyboard accelerator
>    on the PageDisk list, which will select all the
>    Physical Disks. This in addition to the existing
>    CTRL+A which selects *all* the devices, and this
>    enhancement is for automation purposes.
>
>  All the patch files were done against the latest released
>  version, even though there has been no development on them
>  since release date.
>
>  If any question, feel free to contact me.
>
>  thx,
>  .salvo
>  
>
> worth a visit...
> ======================================
> http://guidamadrid.altervista.org
> http://www.worldbuildingservice.com
>
>
>
> ___________________________________
> Yahoo! Messenger: chiamate gratuite in tutto il mondo
> http://it.beta.messenger.yahoo.com
> plain text document attachment (AccessSpecList.patch), "1742150075-
> AccessSpecList.patch"
> 56c56,61 < /* ## Changes ...: 2004-04-24 ([hidden email]) ## */ --- > /* ## Changes ...: ## */ > /* ## 2005-09-08 ([hidden email]) ## */ > /* ## - Added 64K and 2MB profiles, not included in ## */ > /* ## the All-in-one. ## */ > /* ## - Renamed "All in one" to "All in one - no 64K/2M" ## */ > /* ## 2004-04-24 ([hidden email]) ## */ 371a377,492 > > // 65536 Bytes / 64 Kilo Bytes > > spec = New(); > _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 65536; > spec->access[0].reads = 100; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "64K; 75%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 65536; > spec->access[0].reads = 75; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 65536; > spec->access[0].reads = 50; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "64K; 25%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 65536; > spec->access[0].reads = 25; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 65536; > spec->access[0].reads = 0; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > > // 2097152 Bytes / 2 Mega Bytes > > spec = New(); > _snprintf( spec->name, MAX_NAME, "2M; 100%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 2097152; > spec->access[0].reads = 100; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "2M; 75%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 2097152; > spec->access[0].reads = 75; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 2097152; > spec->access[0].reads = 50; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "2M; 25%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 2097152; > spec->access[0].reads = 25; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%% random" ); > spec->access[0].of_size = 100; > spec->access[0].size = 2097152; > spec->access[0].reads = 0; > spec->access[0].random = 0; > spec->access[0].delay = 0; > spec->access[0].burst = 1; > spec->access[0].align = 0; > spec->access[0].reply = 0; > 375c496 < _snprintf( spec->name, MAX_NAME, "All in one" ); --- > _snprintf( spec->name, MAX_NAME, "All in one - no 64K/2M" );
> plain text document attachment (PageDisk.cpp.patch), "905230720-
> PageDisk.cpp.patch"
> 53c53,61 < /* ## Changes ...: 2003-10-17 ([hidden email]) ## */ --- > /* ## Changes ...: 2005-09-08 ([hidden email]) ## */ > /* ## - Added CPageDisk::SetAllCheckByType, to allow ## */ > /* ## disk selection based on type. ## */ > /* ## - In KeyMultiSel: ## */ > /* ## - Added ShowTargets() before the SetAllCheck to ## */ > /* ## reset the list when using the Keyboard accelerator## */ > /* ## - Added case 'P', to select only PhysicalDiskType ## */ > /* ## targets. ## */ > /* ## 2003-10-17 ([hidden email]) ## */ 738a747,781 > // > // Sets all the interface's check box to the specified state. > // but only for specified disktype > // > void CPageDisk::SetAllCheckByType( TargetSelType selection , TargetType disktype) > { > HTREEITEM hdisk; > int i, iface_count; > Manager *manager; > Target_Spec *disk; > > > hdisk = m_TTargets.GetRootItem(); > > manager = theApp.pView->m_pWorkerView->GetSelectedManager(); > if ( !manager ) > return; > > iface_count = manager->InterfaceCount( GenericDiskType ); > for ( i = 0; i < iface_count; i++ ) > { > // > disk = manager->GetInterface( i, GenericDiskType ); > if ( disk->type == disktype ) > { > SetSelectionCheck( hdisk, selection ); > } > > hdisk = m_TTargets.GetNextSiblingItem( hdisk ); > } > } > > > > 1046a1090 > // Clear the target list first, then Select All the targets 1048a1093 > ShowTargets(); 1051a1097,1106 > break; > case 'P': > // Clear the target list first, then Select All the targets > // that match the "PhysicalDiskType" > if ( control ) > { > ShowTargets(); > SetAllCheckByType( TargetChecked , PhysicalDiskType); > StoreTargetSelection(); > }
> plain text document attachment (PageDisk.h.patch), "3992589679-
> PageDisk.h.patch"
> 53c53,56 < /* ## Changes ...: 2003-10-17 ([hidden email]) ## */ --- > /* ## Changes ...: 2005-09-08 ([hidden email]) ## */ > /* ## - Added CPageDisk::SetAllCheckByType, to allow ## */ > /* ## disk selection based on type. ## */ > /* ## 2003-10-17 ([hidden email]) ## */ 119a123 > void SetAllCheckByType( TargetSelType selection , TargetType disktype );



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: new IO profiles and CTRL+P handler

salvatore ventura
Hi Ming,
 here we go.
 Should I always use this format?


 thx,
 .salvo


--- Ming Zhang <[hidden email]> ha scritto:

> Hi Salvo
>
> Thanks a lot.
>
> Could you resend them by using "diff -Nura <old> <new>"?
>
> Thanks
>
> Ming
>
>
>
> On Tue, 2005-09-13 at 02:14 +0200, salvatore ventura
> wrote:
> > Hi,
> >  these three patches apply to files:
> >  * AccessSpecList.cpp
> >  * PageDisk.h
> >  * PageDisk.cpp
> >
> >  and do the following:
> >  - add predefined IO profiles as
> >    - 64KB
> >    - 2 MB
> >    - Rename "All in one" to "All in one - no 64K/2MB"
> >
> >  - add support to handle CTRL+P keyboard accelerator
> >    on the PageDisk list, which will select all the
> >    Physical Disks. This in addition to the existing
> >    CTRL+A which selects *all* the devices, and this
> >    enhancement is for automation purposes.
> >
> >  All the patch files were done against the latest
> released
> >  version, even though there has been no development on
> them
> >  since release date.
> >
> >  If any question, feel free to contact me.
> >
> >  thx,
> >  .salvo
> >  
> >
> > worth a visit...
> > ======================================
> > http://guidamadrid.altervista.org
> > http://www.worldbuildingservice.com
> >
> >
> >
> > ___________________________________
> > Yahoo! Messenger: chiamate gratuite in tutto il mondo
> > http://it.beta.messenger.yahoo.com
> > plain text document attachment (AccessSpecList.patch),
> "1742150075-
> > AccessSpecList.patch"
> > 56c56,61 < /* ## Changes ...: 2004-04-24
> ([hidden email]) ## */ --- > /* ## Changes
> ...: ## */ > /* ## 2005-09-08
> ([hidden email]) ## */ > /* ## - Added
> 64K and 2MB profiles, not included in ## */ > /* ## the
> All-in-one. ## */ > /* ## - Renamed "All in one"
> to "All in one - no 64K/2M" ## */ > /* ## 2004-04-24
> ([hidden email]) ## */ 371a377,492 > > //
> 65536 Bytes / 64 Kilo Bytes > > spec = New(); >
> _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%%
> random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 65536; > spec->access[0].reads =
> 100; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> "64K; 75%% Read; 0%% random" ); >
> spec->access[0].of_size = 100; > spec->access[0].size =
> 65536; > spec->access[0].reads = 75; >
> spec->access[0].random = 0; > spec->access[0].delay = 0;
> > spec->access[0].burst = 1; > spec->access[0].align =
> 0; > spec->access[0].reply = 0; > > spec = New(); >
> _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%%
> random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 65536; > spec->access[0].reads =
> 50; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> "64K; 25%% Read; 0%% random" ); >
> spec->access[0].of_size = 100; > spec->access[0].size =
> 65536; > spec->access[0].reads = 25; >
> spec->access[0].random = 0; > spec->access[0].delay = 0;
> > spec->access[0].burst = 1; > spec->access[0].align =
> 0; > spec->access[0].reply = 0; > > spec = New(); >
> _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%%
> random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 65536; > spec->access[0].reads =
> 0; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > > > // 2097152 Bytes / 2 Mega Bytes > > spec =
> New(); > _snprintf( spec->name, MAX_NAME, "2M; 100%%
> Read; 0%% random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 2097152; > spec->access[0].reads
> = 100; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> "2M; 75%% Read; 0%% random" ); > spec->access[0].of_size
> = 100; > spec->access[0].size = 2097152; >
> spec->access[0].reads = 75; > spec->access[0].random =
> 0; > spec->access[0].delay = 0; > spec->access[0].burst
> = 1; > spec->access[0].align = 0; >
> spec->access[0].reply = 0; > > spec = New(); >
> _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%%
> random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 2097152; > spec->access[0].reads
> = 50; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> "2M; 25%% Read; 0%% random" ); > spec->access[0].of_size
> = 100; > spec->access[0].size = 2097152; >
> spec->access[0].reads = 25; > spec->access[0].random =
> 0; > spec->access[0].delay = 0; > spec->access[0].burst
> = 1; > spec->access[0].align = 0; >
> spec->access[0].reply = 0; > > spec = New(); >
> _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%%
> random" ); > spec->access[0].of_size = 100; >
> spec->access[0].size = 2097152; > spec->access[0].reads
> = 0; > spec->access[0].random = 0; >
> spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > spec->access[0].align = 0; > spec->access[0].reply =
> 0; > 375c496 < _snprintf( spec->name, MAX_NAME, "All
> in one" ); --- > _snprintf( spec->name, MAX_NAME, "All
> in one - no 64K/2M" );
> > plain text document attachment (PageDisk.cpp.patch),
> "905230720-
> > PageDisk.cpp.patch"
> > 53c53,61 < /* ## Changes ...: 2003-10-17
> ([hidden email]) ## */ --- > /* ## Changes
> ...: 2005-09-08 ([hidden email]) ## */ > /* ##
>  - Added CPageDisk::SetAllCheckByType, to allow ## */ >
> /* ## disk selection based on type. ## */ > /* ## - In
> KeyMultiSel: ## */ > /* ## - Added ShowTargets() before
> the SetAllCheck to ## */ > /* ## reset the list when
> using the Keyboard accelerator## */ > /* ## - Added
> case 'P', to select only PhysicalDiskType ## */ > /* ##
> targets. ## */ > /* ## 2003-10-17
> ([hidden email]) ## */ 738a747,781 > // >
> // Sets all the interface's check box to the specified
> state. > // but only for specified disktype > // > void
> CPageDisk::SetAllCheckByType( TargetSelType selection ,
> TargetType disktype) > { > HTREEITEM hdisk; > int i,
> iface_count; > Manager *manager; > Target_Spec
> *disk; > > > hdisk = m_TTargets.GetRootItem(); > >
> manager =
> theApp.pView->m_pWorkerView->GetSelectedManager(); > if
> ( !manager ) > return; > > iface_count =
> manager->InterfaceCount( GenericDiskType ); > for ( i =
> 0; i < iface_count; i++ ) > { > // > disk =
> manager->GetInterface( i, GenericDiskType ); > if (
> disk->type == disktype ) > { > SetSelectionCheck(
> hdisk, selection ); > } > > hdisk =
> m_TTargets.GetNextSiblingItem( hdisk ); > } > } > > > >
> 1046a1090 > // Clear the target list first, then Select
> All the targets 1048a1093 > ShowTargets();
> 1051a1097,1106 > break; > case 'P': > // Clear the
> target list first, then Select All the targets > //
> that match the "PhysicalDiskType" > if ( control ) >
> { > ShowTargets(); > SetAllCheckByType(
> TargetChecked , PhysicalDiskType); >
> StoreTargetSelection(); > }
> > plain text document attachment (PageDisk.h.patch),
> "3992589679-
> > PageDisk.h.patch"
> > 53c53,56 < /* ## Changes ...: 2003-10-17
> ([hidden email]) ## */ --- > /* ## Changes
> ...: 2005-09-08 ([hidden email]) ## */ > /* ##
>  - Added CPageDisk::SetAllCheckByType, to allow ## */ >
> /* ## disk selection based on type. ## */ > /* ##
> 2003-10-17 ([hidden email]) ## */ 119a123 >
> void SetAllCheckByType( TargetSelType selection ,
> TargetType disktype );
>
>

worth a visit...
======================================
http://guidamadrid.altervista.org
http://www.worldbuildingservice.com


       

       
               
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
--- old/AccessSpecList.cpp 2004-04-24 13:34:46.000000000 -0700
+++ new/AccessSpecList.cpp 2005-09-12 10:52:37.000000000 -0700
@@ -53,7 +53,12 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2004-04-24 ([hidden email])             ## */
+/* ##  Changes ...:  ## */
+/* ## 2005-09-08 ([hidden email])  ## */
+/* ##               - Added 64K and 2MB profiles, not included in         ## */
+/* ##                 the All-in-one.  ## */
+/* ##               - Renamed "All in one" to "All in one - no 64K/2M"    ## */
+/* ## 2004-04-24 ([hidden email])             ## */
 /* ##               - Added a large set of Global Access Specifications   ## */
 /* ##                 that can be used as a starting point. The values    ## */
 /* ##                 was taken from the same ICF's provided by           ## */
@@ -369,10 +374,126 @@
  spec->access[0].align = 0;
  spec->access[0].reply = 0;
 
+
+ // 65536 Bytes / 64 Kilo Bytes
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 65536;
+ spec->access[0].reads   = 100;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "64K; 75%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 65536;
+ spec->access[0].reads   = 75;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 65536;
+ spec->access[0].reads   = 50;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "64K; 25%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 65536;
+ spec->access[0].reads   = 25;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 65536;
+ spec->access[0].reads   = 0;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+
+ // 2097152 Bytes / 2 Mega Bytes
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "2M; 100%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 2097152;
+ spec->access[0].reads   = 100;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "2M; 75%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 2097152;
+ spec->access[0].reads   = 75;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 2097152;
+ spec->access[0].reads   = 50;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "2M; 25%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 2097152;
+ spec->access[0].reads   = 25;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
+ spec = New();
+ _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%% random" );
+ spec->access[0].of_size = 100;
+ spec->access[0].size = 2097152;
+ spec->access[0].reads   = 0;
+ spec->access[0].random = 0;
+ spec->access[0].delay = 0;
+ spec->access[0].burst = 1;
+ spec->access[0].align = 0;
+ spec->access[0].reply = 0;
+
  // Brings all specifications into one
 
  spec = New();
- _snprintf( spec->name, MAX_NAME, "All in one" );
+ _snprintf( spec->name, MAX_NAME, "All in one - no 64K/2M" );
 
  spec->access[0].of_size = 5;
  spec->access[0].size = 512;

--- old/PageDisk.cpp 2003-10-18 15:32:50.000000000 -0700
+++ new/PageDisk.cpp 2005-09-08 18:26:37.000000000 -0700
@@ -50,7 +50,15 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-10-17 ([hidden email])             ## */
+/* ##  Changes ...: 2005-09-08 ([hidden email])                ## */
+/* ##            - Added CPageDisk::SetAllCheckByType, to allow        ## */
+/* ##                 disk selection based on type.                       ## */
+/* ##               - In KeyMultiSel:                                     ## */
+/* ##                 - Added ShowTargets() before the SetAllCheck to     ## */
+/* ## reset the list when using the Keyboard accelerator## */
+/* ##      - Added case 'P', to select only PhysicalDiskType   ## */
+/* ##                   targets.                                          ## */
+/* ##   2003-10-17 ([hidden email])             ## */
 /* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
 /* ##                 global defines.                                     ## */
 /* ##               - Integrated the License Statement into this header.  ## */
@@ -736,6 +744,41 @@
 }
 
 
+//
+// Sets all the interface's check box to the specified state.
+// but only for specified disktype
+//
+void CPageDisk::SetAllCheckByType( TargetSelType selection , TargetType disktype)
+{
+ HTREEITEM hdisk;
+ int i, iface_count;
+ Manager *manager;
+ Target_Spec *disk;
+
+
+ hdisk = m_TTargets.GetRootItem();
+
+ manager = theApp.pView->m_pWorkerView->GetSelectedManager();
+ if ( !manager )
+ return;
+
+ iface_count = manager->InterfaceCount( GenericDiskType );
+ for ( i = 0; i < iface_count; i++ )
+ {
+ //
+ disk = manager->GetInterface( i, GenericDiskType );
+ if ( disk->type == disktype )
+ {
+ SetSelectionCheck( hdisk, selection );
+ }
+
+ hdisk = m_TTargets.GetNextSiblingItem( hdisk );
+ }
+}
+
+
+
+
 
 //
 // Updates the queue depth if necessary.
@@ -1044,11 +1087,23 @@
  StoreTargetSelection();
  break;
  case 'A':
+ // Clear the target list first, then Select All the targets
  if ( control )
  {
+ ShowTargets();
  SetAllCheck( TargetChecked );
  StoreTargetSelection();
  }
+ break;
+ case 'P':
+ // Clear the target list first, then Select All the targets
+ // that match the "PhysicalDiskType"
+ if ( control )
+ {
+ ShowTargets();
+ SetAllCheckByType( TargetChecked , PhysicalDiskType);
+ StoreTargetSelection();
+ }
  }
 }
 

--- old/PageDisk.h 2003-10-18 15:32:50.000000000 -0700
+++ new/PageDisk.h 2005-09-08 18:26:23.000000000 -0700
@@ -50,7 +50,10 @@
 /* ##                                                                     ## */
 /* ## ------------------------------------------------------------------- ## */
 /* ##                                                                     ## */
-/* ##  Changes ...: 2003-10-17 ([hidden email])             ## */
+/* ##  Changes ...: 2005-09-08 ([hidden email])                ## */
+/* ##            - Added CPageDisk::SetAllCheckByType, to allow        ## */
+/* ##                 disk selection based on type.                       ## */
+/* ##               2003-10-17 ([hidden email])             ## */
 /* ##               - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_*   ## */
 /* ##                 global defines.                                     ## */
 /* ##               - Integrated the License Statement into this header.  ## */
@@ -117,6 +120,7 @@
  void SetSelectionCheck( HTREEITEM hitem, TargetSelType selection );
  TargetSelType GetSelectionCheck( HTREEITEM hitem );
  void SetAllCheck( TargetSelType selection );
+ void SetAllCheckByType( TargetSelType selection , TargetType disktype );
  void KeyMultiSel( WORD wVKey );
 
  void EditSetfocus( CEdit* edit );
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: new IO profiles and CTRL+P handler

Ming Zhang
yes, at least we use that for linux world.

also in your code, "tab" and "space" are messed a bit. but fine. i will
take care of that.

thx!

Ming

On Tue, 2005-09-13 at 02:28 +0200, salvatore ventura wrote:

> Hi Ming,
>  here we go.
>  Should I always use this format?
>
>
>  thx,
>  .salvo
>
>
> --- Ming Zhang <[hidden email]> ha scritto:
>
> > Hi Salvo
> >
> > Thanks a lot.
> >
> > Could you resend them by using "diff -Nura <old> <new>"?
> >
> > Thanks
> >
> > Ming
> >
> >
> >
> > On Tue, 2005-09-13 at 02:14 +0200, salvatore ventura
> > wrote:
> > > Hi,
> > >  these three patches apply to files:
> > >  * AccessSpecList.cpp
> > >  * PageDisk.h
> > >  * PageDisk.cpp
> > >
> > >  and do the following:
> > >  - add predefined IO profiles as
> > >    - 64KB
> > >    - 2 MB
> > >    - Rename "All in one" to "All in one - no 64K/2MB"
> > >
> > >  - add support to handle CTRL+P keyboard accelerator
> > >    on the PageDisk list, which will select all the
> > >    Physical Disks. This in addition to the existing
> > >    CTRL+A which selects *all* the devices, and this
> > >    enhancement is for automation purposes.
> > >
> > >  All the patch files were done against the latest
> > released
> > >  version, even though there has been no development on
> > them
> > >  since release date.
> > >
> > >  If any question, feel free to contact me.
> > >
> > >  thx,
> > >  .salvo
> > >  
> > >
> > > worth a visit...
> > > ======================================
> > > http://guidamadrid.altervista.org
> > > http://www.worldbuildingservice.com
> > >
> > >
> > >
> > > ___________________________________
> > > Yahoo! Messenger: chiamate gratuite in tutto il mondo
> > > http://it.beta.messenger.yahoo.com
> > > plain text document attachment (AccessSpecList.patch),
> > "1742150075-
> > > AccessSpecList.patch"
> > > 56c56,61 < /* ## Changes ...: 2004-04-24
> > ([hidden email]) ## */ --- > /* ## Changes
> > ...: ## */ > /* ## 2005-09-08
> > ([hidden email]) ## */ > /* ## - Added
> > 64K and 2MB profiles, not included in ## */ > /* ## the
> > All-in-one. ## */ > /* ## - Renamed "All in one"
> > to "All in one - no 64K/2M" ## */ > /* ## 2004-04-24
> > ([hidden email]) ## */ 371a377,492 > > //
> > 65536 Bytes / 64 Kilo Bytes > > spec = New(); >
> > _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%%
> > random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 65536; > spec->access[0].reads =
> > 100; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> > "64K; 75%% Read; 0%% random" ); >
> > spec->access[0].of_size = 100; > spec->access[0].size =
> > 65536; > spec->access[0].reads = 75; >
> > spec->access[0].random = 0; > spec->access[0].delay = 0;
> > > spec->access[0].burst = 1; > spec->access[0].align =
> > 0; > spec->access[0].reply = 0; > > spec = New(); >
> > _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%%
> > random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 65536; > spec->access[0].reads =
> > 50; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> > "64K; 25%% Read; 0%% random" ); >
> > spec->access[0].of_size = 100; > spec->access[0].size =
> > 65536; > spec->access[0].reads = 25; >
> > spec->access[0].random = 0; > spec->access[0].delay = 0;
> > > spec->access[0].burst = 1; > spec->access[0].align =
> > 0; > spec->access[0].reply = 0; > > spec = New(); >
> > _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%%
> > random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 65536; > spec->access[0].reads =
> > 0; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > > > // 2097152 Bytes / 2 Mega Bytes > > spec =
> > New(); > _snprintf( spec->name, MAX_NAME, "2M; 100%%
> > Read; 0%% random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 2097152; > spec->access[0].reads
> > = 100; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> > "2M; 75%% Read; 0%% random" ); > spec->access[0].of_size
> > = 100; > spec->access[0].size = 2097152; >
> > spec->access[0].reads = 75; > spec->access[0].random =
> > 0; > spec->access[0].delay = 0; > spec->access[0].burst
> > = 1; > spec->access[0].align = 0; >
> > spec->access[0].reply = 0; > > spec = New(); >
> > _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%%
> > random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 2097152; > spec->access[0].reads
> > = 50; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > > spec = New(); > _snprintf( spec->name, MAX_NAME,
> > "2M; 25%% Read; 0%% random" ); > spec->access[0].of_size
> > = 100; > spec->access[0].size = 2097152; >
> > spec->access[0].reads = 25; > spec->access[0].random =
> > 0; > spec->access[0].delay = 0; > spec->access[0].burst
> > = 1; > spec->access[0].align = 0; >
> > spec->access[0].reply = 0; > > spec = New(); >
> > _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%%
> > random" ); > spec->access[0].of_size = 100; >
> > spec->access[0].size = 2097152; > spec->access[0].reads
> > = 0; > spec->access[0].random = 0; >
> > spec->access[0].delay = 0; > spec->access[0].burst = 1;
> > > spec->access[0].align = 0; > spec->access[0].reply =
> > 0; > 375c496 < _snprintf( spec->name, MAX_NAME, "All
> > in one" ); --- > _snprintf( spec->name, MAX_NAME, "All
> > in one - no 64K/2M" );
> > > plain text document attachment (PageDisk.cpp.patch),
> > "905230720-
> > > PageDisk.cpp.patch"
> > > 53c53,61 < /* ## Changes ...: 2003-10-17
> > ([hidden email]) ## */ --- > /* ## Changes
> > ...: 2005-09-08 ([hidden email]) ## */ > /* ##
> >  - Added CPageDisk::SetAllCheckByType, to allow ## */ >
> > /* ## disk selection based on type. ## */ > /* ## - In
> > KeyMultiSel: ## */ > /* ## - Added ShowTargets() before
> > the SetAllCheck to ## */ > /* ## reset the list when
> > using the Keyboard accelerator## */ > /* ## - Added
> > case 'P', to select only PhysicalDiskType ## */ > /* ##
> > targets. ## */ > /* ## 2003-10-17
> > ([hidden email]) ## */ 738a747,781 > // >
> > // Sets all the interface's check box to the specified
> > state. > // but only for specified disktype > // > void
> > CPageDisk::SetAllCheckByType( TargetSelType selection ,
> > TargetType disktype) > { > HTREEITEM hdisk; > int i,
> > iface_count; > Manager *manager; > Target_Spec
> > *disk; > > > hdisk = m_TTargets.GetRootItem(); > >
> > manager =
> > theApp.pView->m_pWorkerView->GetSelectedManager(); > if
> > ( !manager ) > return; > > iface_count =
> > manager->InterfaceCount( GenericDiskType ); > for ( i =
> > 0; i < iface_count; i++ ) > { > // > disk =
> > manager->GetInterface( i, GenericDiskType ); > if (
> > disk->type == disktype ) > { > SetSelectionCheck(
> > hdisk, selection ); > } > > hdisk =
> > m_TTargets.GetNextSiblingItem( hdisk ); > } > } > > > >
> > 1046a1090 > // Clear the target list first, then Select
> > All the targets 1048a1093 > ShowTargets();
> > 1051a1097,1106 > break; > case 'P': > // Clear the
> > target list first, then Select All the targets > //
> > that match the "PhysicalDiskType" > if ( control ) >
> > { > ShowTargets(); > SetAllCheckByType(
> > TargetChecked , PhysicalDiskType); >
> > StoreTargetSelection(); > }
> > > plain text document attachment (PageDisk.h.patch),
> > "3992589679-
> > > PageDisk.h.patch"
> > > 53c53,56 < /* ## Changes ...: 2003-10-17
> > ([hidden email]) ## */ --- > /* ## Changes
> > ...: 2005-09-08 ([hidden email]) ## */ > /* ##
> >  - Added CPageDisk::SetAllCheckByType, to allow ## */ >
> > /* ## disk selection based on type. ## */ > /* ##
> > 2003-10-17 ([hidden email]) ## */ 119a123 >
> > void SetAllCheckByType( TargetSelType selection ,
> > TargetType disktype );
> >
> >
>
>
> worth a visit...
> ======================================
> http://guidamadrid.altervista.org
> http://www.worldbuildingservice.com
>
>
>
>
>
>
> ___________________________________
> Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
> http://mail.yahoo.it
> plain text document attachment (AccessSpecList.cpp.patch),
> "1824837905-AccessSpecList.cpp.patch"
> --- old/AccessSpecList.cpp 2004-04-24 13:34:46.000000000 -0700 +++ new/AccessSpecList.cpp 2005-09-12 10:52:37.000000000 -0700 @@ -53,7 +53,12 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2004-04-24 ([hidden email]) ## */ +/* ## Changes ...: ## */ +/* ## 2005-09-08 ([hidden email]) ## */ +/* ## - Added 64K and 2MB profiles, not included in ## */ +/* ## the All-in-one. ## */ +/* ## - Renamed "All in one" to "All in one - no 64K/2M" ## */ +/* ## 2004-04-24 ([hidden email]) ## */ /* ## - Added a large set of Global Access Specifications ## */ /* ## that can be used as a starting point. The values ## */ /* ## was taken from the same ICF's provided by ## */ @@ -369,10 +374,126 @@ spec->access[0].align = 0; spec->access[0].reply = 0; + + // 65536 Bytes / 64 Kilo Bytes + + spec = New(); + _snprintf( spec->name, MAX_NAME, "64K; 100%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 65536; + spec->access[0].reads = 100; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "64K; 75%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 65536; + spec->access[0].reads = 75; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "64K; 50%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 65536; + spec->access[0].reads = 50; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "64K; 25%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 65536; + spec->access[0].reads = 25; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "64K; 0%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 65536; + spec->access[0].reads = 0; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + + // 2097152 Bytes / 2 Mega Bytes + + spec = New(); + _snprintf( spec->name, MAX_NAME, "2M; 100%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 2097152; + spec->access[0].reads = 100; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "2M; 75%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 2097152; + spec->access[0].reads = 75; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "2M; 50%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 2097152; + spec->access[0].reads = 50; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "2M; 25%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 2097152; + spec->access[0].reads = 25; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + + spec = New(); + _snprintf( spec->name, MAX_NAME, "2M; 0%% Read; 0%% random" ); + spec->access[0].of_size = 100; + spec->access[0].size = 2097152; + spec->access[0].reads = 0; + spec->access[0].random = 0; + spec->access[0].delay = 0; + spec->access[0].burst = 1; + spec->access[0].align = 0; + spec->access[0].reply = 0; + // Brings all specifications into one spec = New(); - _snprintf( spec->name, MAX_NAME, "All in one" ); + _snprintf( spec->name, MAX_NAME, "All in one - no 64K/2M" ); spec->access[0].of_size = 5; spec->access[0].size = 512;
> plain text document attachment (PageDisk.cpp.patch), "905230720-
> PageDisk.cpp.patch"
> --- old/PageDisk.cpp 2003-10-18 15:32:50.000000000 -0700 +++ new/PageDisk.cpp 2005-09-08 18:26:37.000000000 -0700 @@ -50,7 +50,15 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2003-10-17 ([hidden email]) ## */ +/* ## Changes ...: 2005-09-08 ([hidden email]) ## */ +/* ## - Added CPageDisk::SetAllCheckByType, to allow ## */ +/* ## disk selection based on type. ## */ +/* ## - In KeyMultiSel: ## */ +/* ## - Added ShowTargets() before the SetAllCheck to ## */ +/* ## reset the list when using the Keyboard accelerator## */ +/* ## - Added case 'P', to select only PhysicalDiskType ## */ +/* ## targets. ## */ +/* ## 2003-10-17 ([hidden email]) ## */ /* ## - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_* ## */ /* ## global defines. ## */ /* ## - Integrated the License Statement into this header. ## */ @@ -736,6 +744,41 @@ } +// +// Sets all the interface's check box to the specified state. +// but only for specified disktype +// +void CPageDisk::SetAllCheckByType( TargetSelType selection , TargetType disktype) +{ + HTREEITEM hdisk; + int i, iface_count; + Manager *manager; + Target_Spec *disk; + + + hdisk = m_TTargets.GetRootItem(); + + manager = theApp.pView->m_pWorkerView->GetSelectedManager(); + if ( !manager ) + return; + + iface_count = manager->InterfaceCount( GenericDiskType ); + for ( i = 0; i < iface_count; i++ ) + { + // + disk = manager->GetInterface( i, GenericDiskType ); + if ( disk->type == disktype ) + { + SetSelectionCheck( hdisk, selection ); + } + + hdisk = m_TTargets.GetNextSiblingItem( hdisk ); + } +} + + + + // // Updates the queue depth if necessary. @@ -1044,11 +1087,23 @@ StoreTargetSelection(); break; case 'A': + // Clear the target list first, then Select All the targets if ( control ) { + ShowTargets(); SetAllCheck( TargetChecked ); StoreTargetSelection(); } + break; + case 'P': + // Clear the target list first, then Select All the targets + // that match the "PhysicalDiskType" + if ( control ) + { + ShowTargets(); + SetAllCheckByType( TargetChecked , PhysicalDiskType); + StoreTargetSelection(); + } } }
> plain text document attachment (PageDisk.h.patch), "3992589679-
> PageDisk.h.patch"
> --- old/PageDisk.h 2003-10-18 15:32:50.000000000 -0700 +++ new/PageDisk.h 2005-09-08 18:26:23.000000000 -0700 @@ -50,7 +50,10 @@ /* ## ## */ /* ## ------------------------------------------------------------------- ## */ /* ## ## */ -/* ## Changes ...: 2003-10-17 ([hidden email]) ## */ +/* ## Changes ...: 2005-09-08 ([hidden email]) ## */ +/* ## - Added CPageDisk::SetAllCheckByType, to allow ## */ +/* ## disk selection based on type. ## */ +/* ## 2003-10-17 ([hidden email]) ## */ /* ## - Moved to the use of the IOMTR_[OSFAMILY|OS|CPU]_* ## */ /* ## global defines. ## */ /* ## - Integrated the License Statement into this header. ## */ @@ -117,6 +120,7 @@ void SetSelectionCheck( HTREEITEM hitem, TargetSelType selection ); TargetSelType GetSelectionCheck( HTREEITEM hitem ); void SetAllCheck( TargetSelType selection ); + void SetAllCheckByType( TargetSelType selection , TargetType disktype ); void KeyMultiSel( WORD wVKey ); void EditSetfocus( CEdit* edit );



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Loading...