You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rake_ext.rb
    path of file: ./repos/rails_performance/lib/rails_performance/gems
    
    the code of the file until where you have to start completion: module RailsPerformance
  module Gems

    class RakeExt
      def self.init
        ::Rake::Task.class_eval do
          def invoke_with_rails_performance(*args)
            begin
              now    = Time.current
              status = 'success'
              invoke_without_new_rails_performance(*args)
            rescue Exception => ex
              sta
    
      def self.init
        ::Rake::Task.class_eval do
          def invoke_with_rails_performance(*args)
            begin
              now    = Time.current
              status = 'success'
              invoke_without_new_rails_performance(*args)
            rescue Exception => ex
              status = 'error'
              raise(ex)
            ensure
              if !RailsPerformance.skipable_rake_tasks.include?(self.name)
                RailsPerformance::Models::RakeRecord.new(
                  task: RailsPerformance::Gems::RakeExt.find_task_name(*args),
                  datetime: now.strftime(RailsPerformance::FORMAT),
                  datetimei: now.to_i,
                  duration: (Time.current - now) * 1000,
                  status: status,
                ).save
              end
            end
          end