perftool-incubator / CommonDataModel

Templates, scripts, and documentation on using a common data format for metrics, benchmark, and environment data
GNU General Public License v3.0
1 stars 3 forks source link

Enhance "--breakout hostname=" to support a list i.e hostname=A,B,C #110

Open HughNhan opened 3 months ago

HughNhan commented 3 months ago

Currently "hostname=" can only take on one value.

[root@dhcp-10-26-9-237 latest]#  crucible get metric --source mpstat --type Busy-CPU --period C14AD596-453D-11EF-9DFF-A4AF4102E06C --breakout hostname                                                                                                                                                                          
*** NOTICE: Crucible is at least 10 commits behind.  See 'crucible repo info' for details. ***                                                                                                                                                                                                                                  

Checking for httpd...appears to be running                                                                                                                                                                                                                                                                                      
Checking for OpenSearch...appears to be running                                                                                                                                                                                                                                                                                 
Available breakouts:  benchmark-name,benchmark-role,core,csid,cstype,die,engine-id,engine-role,engine-type,num,osruntime,package,thread,tool-name,type,endpoint-label,hosted-by,hypervisor-host,userenv                                                                                                                         

                                                               18-07-2024                                                                                                                                                                                                                                                       
 source     type                                      hostname   19:40:01                                                                                                                                                                                                                                                       
-------------------------------------------------------------------------                                                                                                                                                                                                                                                       
 mpstat Busy-CPU appworker-0.blueprint-cwl.nokia.core.bos2.lab      10.51                                                                                                                                                                                                                                                       
 mpstat Busy-CPU    master-0.blueprint-cwl.nokia.core.bos2.lab       3.07                                                                                                                                                                                                                                                       
 mpstat Busy-CPU    master-1.blueprint-cwl.nokia.core.bos2.lab       2.74                                                                                                                                                                                                                                                       
 mpstat Busy-CPU    master-2.blueprint-cwl.nokia.core.bos2.lab       1.82                                                                                                                                                                                                                                                       
 mpstat Busy-CPU                              rhel-performance       2.49                                                                                                                                                                                                                                                       
[root@dhcp-10-26-9-237 latest]#  crucible get metric --source mpstat --type Busy-CPU --period C14AD596-453D-11EF-9DFF-A4AF4102E06C --breakout hostname=appworker-0.blueprint-cwl.nokia.core.bos2.lab                                                                                                                            
*** NOTICE: Crucible is at least 10 commits behind.  See 'crucible repo info' for details. ***                                                                                                                                                                                                                                  

Checking for httpd...appears to be running                                                                                                                                                                                                                                                                                      
Checking for OpenSearch...appears to be running                                                                                                                                                                                                                                                                                 
Available breakouts:  benchmark-name,benchmark-role,core,csid,cstype,die,engine-id,engine-role,engine-type,hostname,num,osruntime,package,thread,tool-name,type,endpoint-label,hosted-by,hypervisor-host,userenv                                                                                                                

                                                                        18-07-2024                                                                                                                                                                                                                                              
 source     type hostname=appworker-0.blueprint-cwl.nokia.core.bos2.lab   19:40:01                                                                                                                                                                                                                                              
----------------------------------------------------------------------------------                                                                                                                                                                                                                                              
 mpstat Busy-CPU          appworker-0.blueprint-cwl.nokia.core.bos2.lab      10.51                                                                                                                                                                                                                                              
[root@dhcp-10-26-9-237 latest]#  crucible get metric --source mpstat --type Busy-CPU --period C14AD596-453D-11EF-9DFF-A4AF4102E06C --breakout hostname=appworker-0.blueprint-cwl.nokia.core.bos2.lab,master-0.blueprint-cwl.nokia.core.bos2.lab                                                                                
*** NOTICE: Crucible is at least 10 commits behind.  See 'crucible repo info' for details. ***

Checking for httpd...appears to be running
Checking for OpenSearch...appears to be running
/opt/crucible/repos/https:github.com:perftool-incubator/CommonDataModel/queries/cdmq/node_modules/http-response-object/lib/index.js:51
            throw err;
            ^
sferlin commented 4 weeks ago

Likewise, I would like "num" to receive a list of CPUs as we often filter by selected CPUs e.g. if we reserve CPUs in a system to run a workload. Two suggestions for the format num='0,1,2...' or num=1,num=2. I can open a new issue, even though this "feature wish" is very related to hostname ^^^.