diff --git a/app/controllers/mpa/pept2filtered_controller.rb b/app/controllers/mpa/pept2filtered_controller.rb index d8110ad..683e4e6 100644 --- a/app/controllers/mpa/pept2filtered_controller.rb +++ b/app/controllers/mpa/pept2filtered_controller.rb @@ -1,13 +1,7 @@ class Mpa::Pept2filteredController < Mpa::MpaController include SuffixArrayHelper - def get_time - Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) - end - def pept2filtered - total_time = get_time - peptides = (params[:peptides] || []).uniq missed = params[:missed].nil? ? false : params[:missed] equate_il = params[:equate_il].nil? ? true : params[:equate_il] @@ -21,32 +15,16 @@ def pept2filtered taxa_filter_ids = (params[:taxa] || []).map(&:to_i) - index_time = get_time - # Request the suffix array search service @response = search(peptides, equate_il, cutoff) .select { |result| !result["cutoff_used"] } - end_index_time = get_time - index_time - - filter_time = get_time - taxa_filter_ids = taxa_filter_ids.to_set @response.each do |result| - result["taxa"] = result["taxa"].to_set & taxa_filter_ids + result["taxa"] = result["taxa"].to_set & taxa_filter_ids end @response.reject! { |result| result["taxa"].empty? } - - end_filter_time = get_time - filter_time - - end_total_time = get_time - total_time - - @timings = { - index_time: end_index_time, - filter_time: end_filter_time, - total_time: end_total_time - } end end diff --git a/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder b/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder index b20746a..c576bc9 100644 --- a/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder +++ b/app/views/mpa/pept2filtered/pept2filtered.json.jbuilder @@ -6,4 +6,3 @@ json.peptides @response do |peptide| json.data peptide["fa"]["data"] end end -json.timings @timings