diff --git a/searx/metrics/__init__.py b/searx/metrics/__init__.py index 9648e6215..5665ca63c 100644 --- a/searx/metrics/__init__.py +++ b/searx/metrics/__init__.py @@ -97,12 +97,12 @@ def initialize(engine_names=None): histogram_storage.configure(histogram_width, histogram_size, 'engine', engine_name, 'time', 'total') -def get_engine_errors(engline_list): +def get_engine_errors(engline_name_list): result = {} engine_names = list(errors_per_engines.keys()) engine_names.sort() for engine_name in engine_names: - if engine_name not in engline_list: + if engine_name not in engline_name_list: continue error_stats = errors_per_engines[engine_name] @@ -126,61 +126,86 @@ def get_engine_errors(engline_list): return result -def to_percentage(stats, maxvalue): - for engine_stat in stats: - if maxvalue: - engine_stat['percentage'] = int(engine_stat['avg'] / maxvalue * 100) +def get_reliabilities(engline_name_list, checker_results): + reliabilities = {} + + engine_errors = get_engine_errors(engline_name_list) + + for engine_name in engline_name_list: + checker_result = checker_results.get(engine_name, {}) + checker_success = checker_result.get('success', True) + errors = engine_errors.get(engine_name) or [] + if counter('engine', engine_name, 'search', 'count', 'sent') == 0: + # no request + reliablity = None + elif checker_success and not errors: + reliablity = 100 + elif 'simple' in checker_result.get('errors', {}): + # the basic (simple) test doesn't work: the engine is broken accoding to the checker + # even if there is no exception + reliablity = 0 else: - engine_stat['percentage'] = 0 - return stats + reliablity = 100 - sum([error['percentage'] for error in errors if not error.get('secondary')]) + + reliabilities[engine_name] = { + 'reliablity': reliablity, + 'errors': errors, + 'checker': checker_results.get(engine_name, {}).get('errors', {}).keys(), + } + return reliabilities -def get_engines_stats(engine_list): +def round_or_none(number, digits): + return round(number, digits) if number else number + + +def get_engines_stats(engine_name_list): assert counter_storage is not None assert histogram_storage is not None list_time = [] max_time_total = max_result_count = None # noqa - for engine_name in engine_list: - successful_count = counter('engine', engine_name, 'search', 'count', 'successful') - if successful_count == 0: + for engine_name in engine_name_list: + sent_count = counter('engine', engine_name, 'search', 'count', 'sent') + if sent_count == 0: continue - result_count_sum = histogram('engine', engine_name, 'result', 'count').sum + successful_count = counter('engine', engine_name, 'search', 'count', 'successful') + time_total = histogram('engine', engine_name, 'time', 'total').percentage(50) time_http = histogram('engine', engine_name, 'time', 'http').percentage(50) time_total_p80 = histogram('engine', engine_name, 'time', 'total').percentage(80) time_http_p80 = histogram('engine', engine_name, 'time', 'http').percentage(80) time_total_p95 = histogram('engine', engine_name, 'time', 'total').percentage(95) time_http_p95 = histogram('engine', engine_name, 'time', 'http').percentage(95) - result_count = result_count_sum / float(successful_count) - if result_count: + result_count = histogram('engine', engine_name, 'result', 'count').percentage(50) + result_count_sum = histogram('engine', engine_name, 'result', 'count').sum + if successful_count and result_count_sum: score = counter('engine', engine_name, 'score') # noqa score_per_result = score / float(result_count_sum) else: score = score_per_result = 0.0 - max_time_total = max(time_total, max_time_total or 0) - max_result_count = max(result_count, max_result_count or 0) + max_time_total = max(time_total or 0, max_time_total or 0) + max_result_count = max(result_count or 0, max_result_count or 0) list_time.append({ - 'total': round(time_total, 1), - 'total_p80': round(time_total_p80, 1), - 'total_p95': round(time_total_p95, 1), - 'http': round(time_http, 1), - 'http_p80': round(time_http_p80, 1), - 'http_p95': round(time_http_p95, 1), 'name': engine_name, - 'processing': round(time_total - time_http, 1), - 'processing_p80': round(time_total_p80 - time_http_p80, 1), - 'processing_p95': round(time_total_p95 - time_http_p95, 1), + 'total': round_or_none(time_total, 1), + 'total_p80': round_or_none(time_total_p80, 1), + 'total_p95': round_or_none(time_total_p95, 1), + 'http': round_or_none(time_http, 1), + 'http_p80': round_or_none(time_http_p80, 1), + 'http_p95': round_or_none(time_http_p95, 1), + 'processing': round(time_total - time_http, 1) if time_total else None, + 'processing_p80': round(time_total_p80 - time_http_p80, 1) if time_total else None, + 'processing_p95': round(time_total_p95 - time_http_p95, 1) if time_total else None, 'score': score, 'score_per_result': score_per_result, 'result_count': result_count, }) - return { 'time': list_time, 'max_time': math.ceil(max_time_total or 0), diff --git a/searx/static/themes/oscar/css/pointhi.css b/searx/static/themes/oscar/css/pointhi.css index 64f612d79..99ed7b576 100644 --- a/searx/static/themes/oscar/css/pointhi.css +++ b/searx/static/themes/oscar/css/pointhi.css @@ -682,6 +682,7 @@ input[type=checkbox]:not(:checked) + .label_hide_if_checked + .label_hide_if_not padding: 0.5rem 1rem; margin: 0rem 0 0 2rem; border: 1px solid #ddd; + box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.1); background: white; font-size: 14px; font-weight: normal; @@ -756,3 +757,21 @@ td:hover .engine-tooltip, padding: 0.4rem 0; width: 1px; } +.stacked-bar-chart-serie1 { + display: flex; + flex-shrink: 0; + flex-grow: 0; + flex-basis: unset; + background: #5bc0de; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + padding: 0.4rem 0; +} +.stacked-bar-chart-serie2 { + display: flex; + flex-shrink: 0; + flex-grow: 0; + flex-basis: unset; + background: #deb15b; + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + padding: 0.4rem 0; +} diff --git a/searx/static/themes/oscar/css/pointhi.min.css b/searx/static/themes/oscar/css/pointhi.min.css index 4332e4767..80027ff8e 100644 --- a/searx/static/themes/oscar/css/pointhi.min.css +++ b/searx/static/themes/oscar/css/pointhi.min.css @@ -1 +1 @@ -html{position:relative;min-height:100%}body{margin-bottom:80px}.footer{position:absolute;bottom:0;width:100%;height:60px}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:after,.onoffswitch-inner:before{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#0C0;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF!important;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.result_header{margin-bottom:5px;margin-top:20px}.result_header .favicon{margin-bottom:-3px}.result_header a{vertical-align:bottom}.result_header a .highlight{font-weight:700}.result-content{margin-top:5px;word-wrap:break-word}.result-content .highlight{font-weight:700}.result-default{clear:both}.result-images{float:left!important;height:138px}.img-thumbnail{margin:5px;max-height:128px}.result-videos{clear:both}.result-torrents{clear:both}.result-map{clear:both}.result-code{clear:both}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:50px}.label-default{color:#AAA;background:#FFF}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}.highlight{font-weight:700}.infobox img{max-height:250px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.infobox .header_url{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.infobox .infobox_toggle{width:100%;text-align:center;margin-bottom:0}.infobox .infobox_checkbox~.infobox_body{max-height:300px;overflow:hidden}.infobox .infobox_checkbox:checked~.infobox_body{max-height:none}.infobox .infobox_checkbox~.infobox_toggle .infobox_label_down{display:block}.infobox .infobox_checkbox~.infobox_toggle .infobox_label_up{display:none}.infobox .infobox_checkbox:checked~.infobox_toggle .infobox_label_up{display:block}.infobox .infobox_checkbox:checked~.infobox_toggle .infobox_label_down{display:none}.infobox .infobox_checkbox~.infobox_body img.infobox_part{display:none}.infobox .infobox_checkbox:checked~.infobox_body img.infobox_part{display:block}#categories,.search_categories{text-transform:capitalize;margin-bottom:1.5rem;margin-top:1.5rem;display:flex;flex-wrap:wrap;align-content:stretch}#categories .input-group-addon,#categories label,.search_categories .input-group-addon,.search_categories label{flex-grow:1;flex-basis:auto;font-size:1.3rem;font-weight:400;background-color:#fff;border:#DDD 1px solid;border-right:none;color:#333;padding-bottom:.8rem;padding-top:.8rem;text-align:center;min-width:50px}#categories .input-group-addon:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,.search_categories label:last-child{border-right:#DDD 1px solid}#categories input[type=checkbox]:checked+label,.search_categories input[type=checkbox]:checked+label{color:#000;font-weight:700;background-color:#EEE}.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}#advanced-search-container{display:none;text-align:center;margin-bottom:1rem;clear:both}#advanced-search-container .input-group-addon,#advanced-search-container label{font-size:1.3rem;font-weight:400;background-color:#fff;border:#DDD 1px solid;border-right:none;color:#333;padding-bottom:.8rem;padding-left:1.2rem;padding-right:1.2rem}#advanced-search-container .input-group-addon:last-child,#advanced-search-container label:last-child{border-right:#DDD 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#000;font-weight:700;background-color:#EEE}#check-advanced{display:none}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}.code-highlight .linenos{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;margin-right:8px;text-align:right}.code-highlight .linenos::selection{background:0 0}.code-highlight .linenos::-moz-selection{background:0 0}.code-highlight pre{line-height:125%}.code-highlight td.linenos .normal{color:inherit;background-color:transparent;padding-left:5px;padding-right:5px}.code-highlight span.linenos{color:inherit;background-color:transparent;padding-left:5px;padding-right:5px}.code-highlight td.linenos .special{color:#000;background-color:#ffffc0;padding-left:5px;padding-right:5px}.code-highlight span.linenos.special{color:#000;background-color:#ffffc0;padding-left:5px;padding-right:5px}.code-highlight .hll{background-color:#ffc}.code-highlight{background:#f8f8f8}.code-highlight .c{color:#408080;font-style:italic}.code-highlight .err{border:1px solid red}.code-highlight .k{color:green;font-weight:700}.code-highlight .o{color:#666}.code-highlight .ch{color:#408080;font-style:italic}.code-highlight .cm{color:#408080;font-style:italic}.code-highlight .cp{color:#BC7A00}.code-highlight .cpf{color:#408080;font-style:italic}.code-highlight .c1{color:#408080;font-style:italic}.code-highlight .cs{color:#408080;font-style:italic}.code-highlight .gd{color:#A00000}.code-highlight .ge{font-style:italic}.code-highlight .gr{color:red}.code-highlight .gh{color:navy;font-weight:700}.code-highlight .gi{color:#00A000}.code-highlight .go{color:#888}.code-highlight .gp{color:navy;font-weight:700}.code-highlight .gs{font-weight:700}.code-highlight .gu{color:purple;font-weight:700}.code-highlight .gt{color:#04D}.code-highlight .kc{color:green;font-weight:700}.code-highlight .kd{color:green;font-weight:700}.code-highlight .kn{color:green;font-weight:700}.code-highlight .kp{color:green}.code-highlight .kr{color:green;font-weight:700}.code-highlight .kt{color:#B00040}.code-highlight .m{color:#666}.code-highlight .s{color:#BA2121}.code-highlight .na{color:#7D9029}.code-highlight .nb{color:green}.code-highlight .nc{color:#00F;font-weight:700}.code-highlight .no{color:#800}.code-highlight .nd{color:#A2F}.code-highlight .ni{color:#999;font-weight:700}.code-highlight .ne{color:#D2413A;font-weight:700}.code-highlight .nf{color:#00F}.code-highlight .nl{color:#A0A000}.code-highlight .nn{color:#00F;font-weight:700}.code-highlight .nt{color:green;font-weight:700}.code-highlight .nv{color:#19177C}.code-highlight .ow{color:#A2F;font-weight:700}.code-highlight .w{color:#bbb}.code-highlight .mb{color:#666}.code-highlight .mf{color:#666}.code-highlight .mh{color:#666}.code-highlight .mi{color:#666}.code-highlight .mo{color:#666}.code-highlight .sa{color:#BA2121}.code-highlight .sb{color:#BA2121}.code-highlight .sc{color:#BA2121}.code-highlight .dl{color:#BA2121}.code-highlight .sd{color:#BA2121;font-style:italic}.code-highlight .s2{color:#BA2121}.code-highlight .se{color:#B62;font-weight:700}.code-highlight .sh{color:#BA2121}.code-highlight .si{color:#B68;font-weight:700}.code-highlight .sx{color:green}.code-highlight .sr{color:#B68}.code-highlight .s1{color:#BA2121}.code-highlight .ss{color:#19177C}.code-highlight .bp{color:green}.code-highlight .fm{color:#00F}.code-highlight .vc{color:#19177C}.code-highlight .vg{color:#19177C}.code-highlight .vi{color:#19177C}.code-highlight .vm{color:#19177C}.code-highlight .il{color:#666}.searx-navbar{background:#eee;color:#aaa;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:1.3rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;text-decoration:none}.searx-navbar .instance a{color:#444;margin-left:2rem}.table>tbody>tr>td,.table>tbody>tr>th{vertical-align:middle!important}.engine-tooltip{display:none;position:absolute;padding:.5rem 1rem;margin:0 0 0 2rem;border:1px solid #ddd;background:#fff;font-size:14px;font-weight:400;z-index:1000000}.engine-tooltip:hover,td:hover .engine-tooltip,th:hover .engine-tooltip{display:inline-block}.stacked-bar-chart{margin:0;padding:0 .125rem 0 3rem;width:100%;width:-moz-available;width:-webkit-fill-available;width:fill;flex-direction:row;flex-wrap:nowrap;flex-grow:1;align-items:center;display:inline-flex}.stacked-bar-chart-value{width:3rem;display:inline-block;position:absolute;padding:0 .5rem;text-align:right}.stacked-bar-chart-base{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset}.stacked-bar-chart-median{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:#000;border:1px solid rgba(0,0,0,.9);padding:.3rem 0}.stacked-bar-chart-rate80{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border:1px solid rgba(0,0,0,.3);padding:.3rem 0}.stacked-bar-chart-rate95{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border-bottom:1px dotted rgba(0,0,0,.5);padding:0}.stacked-bar-chart-rate100{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border-left:1px solid rgba(0,0,0,.9);padding:.4rem 0;width:1px}/*# sourceMappingURL=pointhi.min.css.map */ \ No newline at end of file +html{position:relative;min-height:100%}body{margin-bottom:80px}.footer{position:absolute;bottom:0;width:100%;height:60px}input[type=checkbox]:checked+.label_hide_if_checked,input[type=checkbox]:checked+.label_hide_if_not_checked+.label_hide_if_checked{display:none}input[type=checkbox]:not(:checked)+.label_hide_if_checked+.label_hide_if_not_checked,input[type=checkbox]:not(:checked)+.label_hide_if_not_checked{display:none}.onoff-checkbox{width:15%}.onoffswitch{position:relative;width:110px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.onoffswitch-checkbox{display:none}.onoffswitch-label{display:block;overflow:hidden;cursor:pointer;border:2px solid #FFF!important;border-radius:50px!important}.onoffswitch-inner{display:block;transition:margin .3s ease-in 0s}.onoffswitch-inner:after,.onoffswitch-inner:before{display:block;float:left;width:50%;height:30px;padding:0;line-height:40px;font-size:20px;box-sizing:border-box;content:"";background-color:#EEE}.onoffswitch-switch{display:block;width:37px;background-color:#0C0;position:absolute;top:0;bottom:0;right:0;border:2px solid #FFF!important;border-radius:50px!important;transition:all .3s ease-in 0s}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-inner{margin-right:0}.onoffswitch-checkbox:checked+.onoffswitch-label .onoffswitch-switch{right:71px;background-color:#A1A1A1}.result_header{margin-bottom:5px;margin-top:20px}.result_header .favicon{margin-bottom:-3px}.result_header a{vertical-align:bottom}.result_header a .highlight{font-weight:700}.result-content{margin-top:5px;word-wrap:break-word}.result-content .highlight{font-weight:700}.result-default{clear:both}.result-images{float:left!important;height:138px}.img-thumbnail{margin:5px;max-height:128px}.result-videos{clear:both}.result-torrents{clear:both}.result-map{clear:both}.result-code{clear:both}.suggestion_item{margin:2px 5px;max-width:100%}.suggestion_item .btn{max-width:100%;white-space:normal;word-wrap:break-word;text-align:left}.result_download{margin-right:5px}#pagination{margin-top:30px;padding-bottom:50px}.label-default{color:#AAA;background:#FFF}.result .text-muted small{word-wrap:break-word}.modal-wrapper{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-wrapper{background-clip:padding-box;background-color:#fff;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 3px 9px rgba(0,0,0,.5);outline:0 none;position:relative}.highlight{font-weight:700}.infobox img{max-height:250px}.infobox .infobox_part{margin-bottom:20px;word-wrap:break-word;table-layout:fixed}.infobox .infobox_part:last-child{margin-bottom:0}.infobox .header_url{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.infobox .infobox_toggle{width:100%;text-align:center;margin-bottom:0}.infobox .infobox_checkbox~.infobox_body{max-height:300px;overflow:hidden}.infobox .infobox_checkbox:checked~.infobox_body{max-height:none}.infobox .infobox_checkbox~.infobox_toggle .infobox_label_down{display:block}.infobox .infobox_checkbox~.infobox_toggle .infobox_label_up{display:none}.infobox .infobox_checkbox:checked~.infobox_toggle .infobox_label_up{display:block}.infobox .infobox_checkbox:checked~.infobox_toggle .infobox_label_down{display:none}.infobox .infobox_checkbox~.infobox_body img.infobox_part{display:none}.infobox .infobox_checkbox:checked~.infobox_body img.infobox_part{display:block}#categories,.search_categories{text-transform:capitalize;margin-bottom:1.5rem;margin-top:1.5rem;display:flex;flex-wrap:wrap;align-content:stretch}#categories .input-group-addon,#categories label,.search_categories .input-group-addon,.search_categories label{flex-grow:1;flex-basis:auto;font-size:1.3rem;font-weight:400;background-color:#fff;border:#DDD 1px solid;border-right:none;color:#333;padding-bottom:.8rem;padding-top:.8rem;text-align:center;min-width:50px}#categories .input-group-addon:last-child,#categories label:last-child,.search_categories .input-group-addon:last-child,.search_categories label:last-child{border-right:#DDD 1px solid}#categories input[type=checkbox]:checked+label,.search_categories input[type=checkbox]:checked+label{color:#000;font-weight:700;background-color:#EEE}.visually-hidden{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}#advanced-search-container{display:none;text-align:center;margin-bottom:1rem;clear:both}#advanced-search-container .input-group-addon,#advanced-search-container label{font-size:1.3rem;font-weight:400;background-color:#fff;border:#DDD 1px solid;border-right:none;color:#333;padding-bottom:.8rem;padding-left:1.2rem;padding-right:1.2rem}#advanced-search-container .input-group-addon:last-child,#advanced-search-container label:last-child{border-right:#DDD 1px solid}#advanced-search-container input[type=radio]{display:none}#advanced-search-container input[type=radio]:checked+label{color:#000;font-weight:700;background-color:#EEE}#check-advanced{display:none}#check-advanced:checked~#advanced-search-container{display:block}.advanced{padding:0;margin-top:.3rem;text-align:right}.advanced label,.advanced select{cursor:pointer}.cursor-text{cursor:text!important}.cursor-pointer{cursor:pointer!important}.code-highlight .linenos{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;margin-right:8px;text-align:right}.code-highlight .linenos::selection{background:0 0}.code-highlight .linenos::-moz-selection{background:0 0}.code-highlight pre{line-height:125%}.code-highlight td.linenos .normal{color:inherit;background-color:transparent;padding-left:5px;padding-right:5px}.code-highlight span.linenos{color:inherit;background-color:transparent;padding-left:5px;padding-right:5px}.code-highlight td.linenos .special{color:#000;background-color:#ffffc0;padding-left:5px;padding-right:5px}.code-highlight span.linenos.special{color:#000;background-color:#ffffc0;padding-left:5px;padding-right:5px}.code-highlight .hll{background-color:#ffc}.code-highlight{background:#f8f8f8}.code-highlight .c{color:#408080;font-style:italic}.code-highlight .err{border:1px solid red}.code-highlight .k{color:green;font-weight:700}.code-highlight .o{color:#666}.code-highlight .ch{color:#408080;font-style:italic}.code-highlight .cm{color:#408080;font-style:italic}.code-highlight .cp{color:#BC7A00}.code-highlight .cpf{color:#408080;font-style:italic}.code-highlight .c1{color:#408080;font-style:italic}.code-highlight .cs{color:#408080;font-style:italic}.code-highlight .gd{color:#A00000}.code-highlight .ge{font-style:italic}.code-highlight .gr{color:red}.code-highlight .gh{color:navy;font-weight:700}.code-highlight .gi{color:#00A000}.code-highlight .go{color:#888}.code-highlight .gp{color:navy;font-weight:700}.code-highlight .gs{font-weight:700}.code-highlight .gu{color:purple;font-weight:700}.code-highlight .gt{color:#04D}.code-highlight .kc{color:green;font-weight:700}.code-highlight .kd{color:green;font-weight:700}.code-highlight .kn{color:green;font-weight:700}.code-highlight .kp{color:green}.code-highlight .kr{color:green;font-weight:700}.code-highlight .kt{color:#B00040}.code-highlight .m{color:#666}.code-highlight .s{color:#BA2121}.code-highlight .na{color:#7D9029}.code-highlight .nb{color:green}.code-highlight .nc{color:#00F;font-weight:700}.code-highlight .no{color:#800}.code-highlight .nd{color:#A2F}.code-highlight .ni{color:#999;font-weight:700}.code-highlight .ne{color:#D2413A;font-weight:700}.code-highlight .nf{color:#00F}.code-highlight .nl{color:#A0A000}.code-highlight .nn{color:#00F;font-weight:700}.code-highlight .nt{color:green;font-weight:700}.code-highlight .nv{color:#19177C}.code-highlight .ow{color:#A2F;font-weight:700}.code-highlight .w{color:#bbb}.code-highlight .mb{color:#666}.code-highlight .mf{color:#666}.code-highlight .mh{color:#666}.code-highlight .mi{color:#666}.code-highlight .mo{color:#666}.code-highlight .sa{color:#BA2121}.code-highlight .sb{color:#BA2121}.code-highlight .sc{color:#BA2121}.code-highlight .dl{color:#BA2121}.code-highlight .sd{color:#BA2121;font-style:italic}.code-highlight .s2{color:#BA2121}.code-highlight .se{color:#B62;font-weight:700}.code-highlight .sh{color:#BA2121}.code-highlight .si{color:#B68;font-weight:700}.code-highlight .sx{color:green}.code-highlight .sr{color:#B68}.code-highlight .s1{color:#BA2121}.code-highlight .ss{color:#19177C}.code-highlight .bp{color:green}.code-highlight .fm{color:#00F}.code-highlight .vc{color:#19177C}.code-highlight .vg{color:#19177C}.code-highlight .vi{color:#19177C}.code-highlight .vm{color:#19177C}.code-highlight .il{color:#666}.searx-navbar{background:#eee;color:#aaa;height:2.3rem;font-size:1.3rem;line-height:1.3rem;padding:.5rem;font-weight:700;margin-bottom:1.3rem}.searx-navbar a,.searx-navbar a:hover{margin-right:2rem;text-decoration:none}.searx-navbar .instance a{color:#444;margin-left:2rem}.table>tbody>tr>td,.table>tbody>tr>th{vertical-align:middle!important}.engine-tooltip{display:none;position:absolute;padding:.5rem 1rem;margin:0 0 0 2rem;border:1px solid #ddd;box-shadow:2px 2px 2px 0 rgba(0,0,0,.1);background:#fff;font-size:14px;font-weight:400;z-index:1000000}.engine-tooltip:hover,td:hover .engine-tooltip,th:hover .engine-tooltip{display:inline-block}.stacked-bar-chart{margin:0;padding:0 .125rem 0 3rem;width:100%;width:-moz-available;width:-webkit-fill-available;width:fill;flex-direction:row;flex-wrap:nowrap;flex-grow:1;align-items:center;display:inline-flex}.stacked-bar-chart-value{width:3rem;display:inline-block;position:absolute;padding:0 .5rem;text-align:right}.stacked-bar-chart-base{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset}.stacked-bar-chart-median{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:#000;border:1px solid rgba(0,0,0,.9);padding:.3rem 0}.stacked-bar-chart-rate80{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border:1px solid rgba(0,0,0,.3);padding:.3rem 0}.stacked-bar-chart-rate95{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border-bottom:1px dotted rgba(0,0,0,.5);padding:0}.stacked-bar-chart-rate100{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:0 0;border-left:1px solid rgba(0,0,0,.9);padding:.4rem 0;width:1px}.stacked-bar-chart-serie1{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:#5bc0de;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);padding:.4rem 0}.stacked-bar-chart-serie2{display:flex;flex-shrink:0;flex-grow:0;flex-basis:unset;background:#deb15b;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);padding:.4rem 0}/*# sourceMappingURL=pointhi.min.css.map */ \ No newline at end of file diff --git a/searx/static/themes/oscar/css/pointhi.min.css.map b/searx/static/themes/oscar/css/pointhi.min.css.map index abb30817f..708e2f63a 100644 --- a/searx/static/themes/oscar/css/pointhi.min.css.map +++ b/searx/static/themes/oscar/css/pointhi.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["../src/less/pointhi/footer.less","../src/less/pointhi/checkbox.less","../src/less/pointhi/onoff.less","../src/less/pointhi/results.less","../src/less/pointhi/infobox.less","../src/less/pointhi/search.less","../src/less/pointhi/advanced.less","../src/less/pointhi/cursor.less","../src/less/pointhi/pygments.less","../src/less/pointhi/navbar.less","../src/less/pointhi/preferences.less"],"names":[],"mappings":"AAEA,KACE,SAAA,SACA,WAAA,KAGF,KAEE,cAAA,KAGF,QACE,SAAA,SACA,OAAA,EACA,MAAA,KAEA,OAAA,KChB2B,oDAAoF,+EAC/G,QAAA,KAI2H,qFAA1F,8DACjC,QAAA,KCPF,gBACI,MAAA,IAEJ,aACI,SAAA,SACA,MAAA,MACA,oBAAA,KACA,iBAAA,KACA,gBAAA,KAEJ,sBACI,QAAA,KAEJ,mBACI,QAAA,MACA,SAAA,OACA,OAAA,QACA,OAAA,IAAA,MAAA,eACA,cAAA,eAEJ,mBACI,QAAA,MACA,WAAA,OAAA,IAAA,QAAA,GAGyC,yBAA3B,0BACd,QAAA,MACA,MAAA,KACA,MAAA,IACA,OAAA,KACA,QAAA,EACA,YAAA,KACA,UAAA,KACA,WAAA,WACA,QAAA,GACA,iBAAA,KAGJ,oBACI,QAAA,MACA,MAAA,KACA,iBAAA,KACA,SAAA,SACA,IAAA,EACA,OAAA,EACA,MAAA,EACA,OAAA,IAAA,MAAA,eACA,cAAA,eACA,WAAA,IAAA,IAAA,QAAA,GAE+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,MAAA,eACA,QAAA,MAAA,EACA,MAAA"} \ No newline at end of file +{"version":3,"sources":["../src/less/pointhi/footer.less","../src/less/pointhi/checkbox.less","../src/less/pointhi/onoff.less","../src/less/pointhi/results.less","../src/less/pointhi/infobox.less","../src/less/pointhi/search.less","../src/less/pointhi/advanced.less","../src/less/pointhi/cursor.less","../src/less/pointhi/pygments.less","../src/less/pointhi/navbar.less","../src/less/pointhi/preferences.less"],"names":[],"mappings":"AAEA,KACE,SAAA,SACA,WAAA,KAGF,KAEE,cAAA,KAGF,QACE,SAAA,SACA,OAAA,EACA,MAAA,KAEA,OAAA,KChB2B,oDAAoF,+EAC/G,QAAA,KAI2H,qFAA1F,8DACjC,QAAA,KCPF,gBACI,MAAA,IAEJ,aACI,SAAA,SACA,MAAA,MACA,oBAAA,KACA,iBAAA,KACA,gBAAA,KAEJ,sBACI,QAAA,KAEJ,mBACI,QAAA,MACA,SAAA,OACA,OAAA,QACA,OAAA,IAAA,MAAA,eACA,cAAA,eAEJ,mBACI,QAAA,MACA,WAAA,OAAA,IAAA,QAAA,GAGyC,yBAA3B,0BACd,QAAA,MACA,MAAA,KACA,MAAA,IACA,OAAA,KACA,QAAA,EACA,YAAA,KACA,UAAA,KACA,WAAA,WACA,QAAA,GACA,iBAAA,KAGJ,oBACI,QAAA,MACA,MAAA,KACA,iBAAA,KACA,SAAA,SACA,IAAA,EACA,OAAA,EACA,MAAA,EACA,OAAA,IAAA,MAAA,eACA,cAAA,eACA,WAAA,IAAA,IAAA,QAAA,GAE+C,oEAC/C,aAAA,EAE+C,qEAC/C,MAAA,KACA,iBAAA,QCtDJ,eACI,cAAA,IACA,WAAA,KAEA,wBACI,cAAA,KAGJ,iBACI,eAAA,OAEA,4BACI,YAAA,IAKZ,gBACI,WAAA,IACA,UAAA,WAEA,2BACI,YAAA,IAKR,gBACI,MAAA,KAIJ,eACI,MAAA,eACA,OAAA,MAGJ,eACI,OAAA,IACA,WAAA,MAIJ,eACI,MAAA,KAIJ,iBACI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A,gBACA,QAAA,MAAA"} \ No newline at end of file diff --git a/searx/static/themes/oscar/src/less/pointhi/preferences.less b/searx/static/themes/oscar/src/less/pointhi/preferences.less index cb63674ed..352aed513 100644 --- a/searx/static/themes/oscar/src/less/pointhi/preferences.less +++ b/searx/static/themes/oscar/src/less/pointhi/preferences.less @@ -8,6 +8,7 @@ padding: 0.5rem 1rem; margin: 0rem 0 0 2rem; border: 1px solid #ddd; + box-shadow: 2px 2px 2px 0px rgba(0,0,0,0.1); background: white; font-size: 14px; font-weight: normal; @@ -77,3 +78,17 @@ th:hover .engine-tooltip, td:hover .engine-tooltip, .engine-tooltip:hover { width: 1px; } +.stacked-bar-chart-serie1 { + .stacked-bar-chart-base(); + background: #5bc0de; + box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + padding: 0.4rem 0; +} + +.stacked-bar-chart-serie2 { + .stacked-bar-chart-base(); + background: #deb15b; + box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); + padding: 0.4rem 0; +} + diff --git a/searx/templates/oscar/stats.html b/searx/templates/oscar/stats.html index 0851343ce..149522226 100644 --- a/searx/templates/oscar/stats.html +++ b/searx/templates/oscar/stats.html @@ -1,6 +1,5 @@ {% extends "oscar/base.html" %} {% block styles %} - {% endblock %} {% block title %}{{ _('stats') }} - {% endblock %} + +{%- macro th_sort(column_order, column_name) -%} + {% if column_order==sort_order %} + {{ column_name }} {{ icon('chevron-down') }} + {% else %} + {{ column_name }} + {% endif %} +{%- endmacro -%} + {% block content %}

{{ _('Engine stats') }}

@@ -25,27 +33,33 @@ {% else %} - - - - + + + + + {% for engine_stat in engine_stats.get('time', []) %}
{{ _("Engine name") }}{{ _('Scores') }}{{ _('Number of results') }}{{ _('Response time') }}{{ th_sort('name', _("Engine name")) }}{{ th_sort('score', _('Scores')) }}{{ th_sort('result_count', _('Result count')) }}{{ th_sort('time', _('Response time')) }}{{ th_sort('reliability', _('Reliability')) }}
{{ engine_stat.name }} + {% if engine_stat.score %} {{ engine_stat.score|round(1) }} + {% endif %} + {%- if engine_stat.result_count -%} {{- engine_stat.result_count | int -}}{{- "" -}} {{- "" -}} + + {%- endif -%} + {%- if engine_stat.total -%} {{- engine_stat.total | round(1) -}}{{- "" -}}
+ {%- endif -%} + {{ engine_reliabilities.get(engine_stat.name, {}).get('reliablity') }} {% endfor %} diff --git a/searx/webapp.py b/searx/webapp.py index d2a1ad5f5..d917c16d4 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -93,7 +93,7 @@ from searx.preferences import Preferences, ValidationException, LANGUAGE_CODES from searx.answerers import answerers from searx.network import stream as http_stream from searx.answerers import ask -from searx.metrics import get_engines_stats, get_engine_errors, histogram, counter +from searx.metrics import get_engines_stats, get_engine_errors, get_reliabilities, histogram, counter # serve pages with HTTP/1.1 from werkzeug.serving import WSGIRequestHandler @@ -1073,11 +1073,47 @@ def image_proxy(): @app.route('/stats', methods=['GET']) def stats(): """Render engine statistics page.""" + checker_results = checker_get_result() + checker_results = checker_results['engines'] \ + if checker_results['status'] == 'ok' and 'engines' in checker_results else {} + filtered_engines = dict(filter(lambda kv: (kv[0], request.preferences.validate_token(kv[1])), engines.items())) engine_stats = get_engines_stats(filtered_engines) + engine_reliabilities = get_reliabilities(filtered_engines, checker_results) + + sort_order = request.args.get('sort', default='name', type=str) + + SORT_PARAMETERS = { + 'name': (False, 'name', ''), + 'score': (True, 'score', 0), + 'result_count': (True, 'result_count', 0), + 'time': (False, 'total', 0), + 'reliability': (False, 'reliability', 100), + } + + if sort_order not in SORT_PARAMETERS: + sort_order = 'name' + + reverse, key_name, default_value = SORT_PARAMETERS[sort_order] + + def get_key(engine_stat): + reliability = engine_reliabilities.get(engine_stat['name']).get('reliablity', 0) + reliability_order = 0 if reliability else 1 + if key_name == 'reliability': + key = reliability + reliability_order = 0 + else: + key = engine_stat.get(key_name) or default_value + if reverse: + reliability_order = 1 - reliability_order + return (reliability_order, key, engine_stat['name']) + + engine_stats['time'] = sorted(engine_stats['time'], reverse=reverse, key=get_key) return render( 'stats.html', - engine_stats=engine_stats + sort_order=sort_order, + engine_stats=engine_stats, + engine_reliabilities=engine_reliabilities, )