@@ -529,6 +529,12 @@ <h1>ClickBench — a Benchmark For Analytical DBMS</h1>
529529 < a id ="select-all-machines " class ="selector selector-active "> All</ a >
530530 </ td >
531531 </ tr >
532+ < tr >
533+ < th > Ram: </ th >
534+ < td id ="selectors_ram ">
535+ < a id ="select-all-ram " class ="selector selector-active "> All</ a >
536+ </ td >
537+ </ tr >
532538 < tr >
533539 < th > Cluster size: </ th >
534540 < td id ="selectors_cluster_size ">
@@ -605,6 +611,7 @@ <h2>Detailed Comparison</h2>
605611 "data_format" : { } ,
606612 "partitioning" : { } ,
607613 "machine" : { } ,
614+ "ram" : { } ,
608615 "cluster_size" : { } ,
609616 "opensource" : { "yes" : true , "no" : true } ,
610617 "hardware" : { "cpu" : true , "gpu" : false } ,
@@ -638,6 +645,7 @@ <h2>Detailed Comparison</h2>
638645let data_formats = document . getElementById ( 'selectors_data_format' ) ;
639646let partitioning = document . getElementById ( 'selectors_partitioning' ) ;
640647let machines = document . getElementById ( 'selectors_machine' ) ;
648+ let ram = document . getElementById ( 'selectors_ram' ) ;
641649let cluster_sizes = document . getElementById ( 'selectors_cluster_size' ) ;
642650
643651const data_format_tags = new Set ( [ 'dataframe' , 'feather' , 'parquet' , 'Velox' , 'Vortex' ] ) ;
@@ -663,7 +671,35 @@ <h2>Detailed Comparison</h2>
663671 return / ^ (?: \d + ) ? (?: X S | S | M | L | X L | X X L ) $ / . test ( machine ) ;
664672}
665673
674+ function splitMachineAndRam ( machine ) {
675+ const cloud_match = machine . match ( / ^ ( C l i c k H o u s e ☁ ️ ) : \s * ( \d + G i B ) $ / ) ;
676+ if ( cloud_match ) {
677+ return { machine : cloud_match [ 1 ] , ram : cloud_match [ 2 ] } ;
678+ }
679+
680+ const ram_match = machine . match ( / ^ ( \d + G i B ) $ / ) ;
681+ return { machine : ram_match ? null : machine , ram : ram_match ? ram_match [ 1 ] : null } ;
682+ }
683+
684+ function displayMachine ( elem ) {
685+ const cluster = Number . isInteger ( elem . cluster_size ) && elem . cluster_size > 1 ? elem . cluster_size + '×' : '' ;
686+ return cluster + ( elem . machine || elem . ram [ 0 ] || '' ) ;
687+ }
688+
689+ const machine_aliases = { } ;
690+ const machine_to_ram_aliases = { } ;
691+
666692data . forEach ( elem => {
693+ const original_machine = elem . machine ;
694+ const machine_and_ram = splitMachineAndRam ( original_machine ) ;
695+ elem . machine = machine_and_ram . machine ;
696+ elem . ram = machine_and_ram . ram ? [ machine_and_ram . ram ] : [ ] ;
697+ machine_aliases [ original_machine ] = elem . machine ;
698+ if ( elem . machine ) {
699+ machine_aliases [ elem . machine ] = elem . machine ;
700+ }
701+ if ( machine_and_ram . ram ) machine_to_ram_aliases [ original_machine ] = machine_and_ram . ram ;
702+
667703 elem . database = normalizeDatabase ( elem . system ) ;
668704 elem . tags = uniqueValues ( [ ...( elem . tags || [ ] ) , ...tagsFromDatabaseName ( elem . system ) ] ) ;
669705 elem . data_format = uniqueValues ( elem . tags
@@ -789,7 +825,11 @@ <h2>Detailed Comparison</h2>
789825 makeValueSelector ( partitioning , selectors . partitioning , elem ) ;
790826} ) ;
791827
792- [ ... new Set ( data . map ( elem => elem . machine ) ) ] . filter ( elem => ! isClusterSizeAlias ( elem ) ) . sort ( ( a , b ) => {
828+ [ ... new Set ( data . map ( elem => elem . ram ) . flat ( ) ) ] . sort ( ( a , b ) => a . localeCompare ( b , undefined , { numeric : true , sensitivity : 'base' } ) ) . map ( elem => {
829+ makeValueSelector ( ram , selectors . ram , elem ) ;
830+ } ) ;
831+
832+ [ ... new Set ( data . map ( elem => elem . machine ) ) ] . filter ( elem => elem && ! isClusterSizeAlias ( elem ) ) . sort ( ( a , b ) => {
793833 const count_diff = data . filter ( elem => elem . machine === b ) . length - data . filter ( elem => elem . machine === a ) . length ;
794834 return count_diff == 0 ? a . localeCompare ( b , undefined , { numeric : true , sensitivity : 'base' } ) : count_diff ;
795835} ) . map ( elem => {
@@ -877,6 +917,7 @@ <h2>Detailed Comparison</h2>
877917document . getElementById ( 'select-all-data-formats' ) . addEventListener ( 'click' , e => toggleAll ( e , selectors . data_format ) ) ;
878918document . getElementById ( 'select-all-partitioning' ) . addEventListener ( 'click' , e => toggleAll ( e , selectors . partitioning ) ) ;
879919document . getElementById ( 'select-all-machines' ) . addEventListener ( 'click' , e => toggleAll ( e , selectors . machine ) ) ;
920+ document . getElementById ( 'select-all-ram' ) . addEventListener ( 'click' , e => toggleAll ( e , selectors . ram ) ) ;
880921document . getElementById ( 'select-all-cluster-sizes' ) . addEventListener ( 'click' , e => toggleAll ( e , selectors . cluster_size ) ) ;
881922
882923const metric_selectors = [ ...document . querySelectorAll ( '[id^="selector-metric-"]' ) ] ;
@@ -898,6 +939,7 @@ <h2>Detailed Comparison</h2>
898939 [ ...data_formats . childNodes ] . map ( elem => { elem . className = selectors . data_format [ elem . innerText ] ? 'selector selector-active' : 'selector' } ) ;
899940 [ ...partitioning . childNodes ] . map ( elem => { elem . className = selectors . partitioning [ elem . innerText ] ? 'selector selector-active' : 'selector' } ) ;
900941 [ ...machines . childNodes ] . map ( elem => { elem . className = selectors . machine [ elem . innerText ] ? 'selector selector-active' : 'selector' } ) ;
942+ [ ...ram . childNodes ] . map ( elem => { elem . className = selectors . ram [ elem . innerText ] ? 'selector selector-active' : 'selector' } ) ;
901943 [ ...cluster_sizes . childNodes ] . map ( elem => { elem . className = selectors . cluster_size [ elem . innerText ] ? 'selector selector-active' : 'selector' } ) ;
902944
903945 metric_selectors . map ( elem => {
@@ -933,7 +975,8 @@ <h2>Detailed Comparison</h2>
933975 apply ( databases , e => [ e . database ] ) ;
934976 apply ( data_formats , e => e . data_format || [ ] ) ;
935977 apply ( partitioning , e => e . partitioning || [ ] ) ;
936- apply ( machines , e => [ e . machine ] ) ;
978+ apply ( machines , e => e . machine ? [ e . machine ] : [ ] ) ;
979+ apply ( ram , e => e . ram || [ ] ) ;
937980 apply ( cluster_sizes , e => [ e . cluster_size ] ) ;
938981
939982 for ( const elem of tags . childNodes ) {
@@ -959,6 +1002,7 @@ <h2>Detailed Comparison</h2>
9591002 process ( 'data_format' , data_formats ) ;
9601003 process ( 'partitioning' , partitioning ) ;
9611004 process ( 'machine' , machines ) ;
1005+ process ( 'ram' , ram ) ;
9621006 process ( 'cluster_size' , cluster_sizes ) ;
9631007}
9641008
@@ -1109,7 +1153,7 @@ <h2>Detailed Comparison</h2>
11091153 td_name . appendChild ( remove ) ;
11101154
11111155 let link = document . createElement ( 'a' ) ;
1112- link . appendChild ( document . createTextNode ( `${ elem . system } (${ Number . isInteger ( elem . cluster_size ) && elem . cluster_size > 1 ? elem . cluster_size + '×' : '' } ${ elem . machine } )` ) ) ;
1156+ link . appendChild ( document . createTextNode ( `${ elem . system } (${ displayMachine ( elem ) } )` ) ) ;
11131157 link . href = "https://github.com/ClickHouse/ClickBench/blob/main/" + elem . source ;
11141158 link . style . color = `oklch(var(--hashed-link-lightness) 0.2018 ${ nameToColor ( elem . system . split ( ' ' ) [ 0 ] ) } )`
11151159 td_name . appendChild ( link ) ;
@@ -1233,7 +1277,8 @@ <h2>Detailed Comparison</h2>
12331277
12341278 let filtered_data = data . filter ( elem =>
12351279 selectors . database [ elem . database ] &&
1236- ( isClusterSizeAlias ( elem . machine ) || selectors . machine [ elem . machine ] ) &&
1280+ ( ! elem . machine || isClusterSizeAlias ( elem . machine ) || selectors . machine [ elem . machine ] ) &&
1281+ matchesSelector ( elem . ram , selectors . ram ) &&
12371282 selectors . cluster_size [ elem . cluster_size ] &&
12381283 matchesSelector ( elem . tags , selectors . tags ) &&
12391284 matchesSelector ( elem . data_format , selectors . data_format ) &&
@@ -1293,7 +1338,7 @@ <h2>Detailed Comparison</h2>
12931338 sorted_indices . map ( idx => {
12941339 const elem = filtered_data [ idx ] ;
12951340 let th = document . createElement ( 'th' ) ;
1296- th . appendChild ( document . createTextNode ( `${ elem . system } \n(${ Number . isInteger ( elem . cluster_size ) && elem . cluster_size > 1 ? elem . cluster_size + '×' : '' } ${ elem . machine } )` ) ) ;
1341+ th . appendChild ( document . createTextNode ( `${ elem . system } \n(${ displayMachine ( elem ) } )` ) ) ;
12971342 th . className = 'th-entry' ;
12981343 th . dataset . database = elem . database ;
12991344 th . addEventListener ( 'mouseover' , ( ) => highlightDatabaseTags ( elem . database ) ) ;
@@ -1478,12 +1523,18 @@ <h2>Detailed Comparison</h2>
14781523 const keys = k === 'database'
14791524 ? Object . keys ( database_aliases )
14801525 : k === 'machine'
1481- ? [ ... new Set ( data . map ( elem => elem . machine ) ) ]
1526+ ? Object . keys ( machine_aliases )
14821527 : Object . keys ( selectors [ k ] ) ;
14831528 let filtered = v . substring ( 1 , v . length ) . split ( '|' ) . filter ( s => s !== '' )
14841529 . map ( substr => {
1485- const matches = keys . filter ( x => isSubsequence ( x , decodeURIComponent ( substr ) ) ) ;
1530+ const decodedSubstr = decodeURIComponent ( substr ) ;
1531+ if ( keys . includes ( decodedSubstr ) ) return decodedSubstr ;
1532+ const matches = keys . filter ( x => isSubsequence ( x , decodedSubstr ) ) ;
14861533 if ( matches . length == 0 ) return null ;
1534+ if ( k === 'machine' ) {
1535+ const machineMatch = matches . find ( x => machine_to_ram_aliases [ x ] ) ;
1536+ if ( machineMatch ) return machineMatch ;
1537+ }
14871538 const match = matches . reduce ( ( a , b ) => a . length <= b . length ? a : b ) ;
14881539 return k === 'database' ? database_aliases [ match ] : match ;
14891540 } )
@@ -1495,6 +1546,16 @@ <h2>Detailed Comparison</h2>
14951546 if ( v . startsWith ( '+' ) && filtered . length == 0 && aliasFiltered . length > 0 ) {
14961547 return ;
14971548 }
1549+ const ramFiltered = filtered
1550+ . map ( x => machine_to_ram_aliases [ x ] )
1551+ . filter ( x => x && Object . hasOwn ( selectors . ram , x ) ) ;
1552+ if ( ramFiltered . length > 0 && ! decoded . ram ) {
1553+ decoded . ram = { } ;
1554+ Object . keys ( selectors . ram ) . forEach ( x => {
1555+ decoded . ram [ x ] = v . startsWith ( '+' ) ? ramFiltered . includes ( x ) : ! ramFiltered . includes ( x ) ;
1556+ } ) ;
1557+ }
1558+ filtered = filtered . map ( x => machine_aliases [ x ] || x ) ;
14981559 }
14991560
15001561 if ( v . startsWith ( '+' ) ) {
@@ -1548,6 +1609,32 @@ <h2>Detailed Comparison</h2>
15481609 normalizedState . database = normalizedDatabase ;
15491610 }
15501611
1612+ if ( normalizedState . machine ) {
1613+ const normalizedMachine = { } ;
1614+ const normalizedRam = normalizedState . ram ? { ...normalizedState . ram } : { ...selectors . ram } ;
1615+ Object . keys ( selectors . machine ) . forEach ( machine => {
1616+ normalizedMachine [ machine ] = selectors . machine [ machine ] ;
1617+ } ) ;
1618+ Object . entries ( normalizedState . machine ) . forEach ( ( [ machine , selected ] ) => {
1619+ const normalizedName = machine_aliases [ machine ] || machine ;
1620+ if ( Object . hasOwn ( selectors . machine , normalizedName ) ) {
1621+ normalizedMachine [ normalizedName ] = selected ;
1622+ }
1623+
1624+ const ramValue = machine_to_ram_aliases [ machine ] ;
1625+ if ( ramValue && Object . hasOwn ( selectors . ram , ramValue ) ) {
1626+ if ( selected && ! normalizedState . ram ) {
1627+ Object . keys ( normalizedRam ) . forEach ( value => {
1628+ normalizedRam [ value ] = false ;
1629+ } ) ;
1630+ }
1631+ normalizedRam [ ramValue ] = selected ;
1632+ }
1633+ } ) ;
1634+ normalizedState . machine = normalizedMachine ;
1635+ normalizedState . ram = normalizedRam ;
1636+ }
1637+
15511638 return {
15521639 ...selectors ,
15531640 ...normalizedState ,
0 commit comments