|
===================================== 〔語彙分解〕的な部分一致の検索結果は以下の通りです。 ・ ジュール : [じゅーる] 【名詞】 1. joule 2. (n) joule ・ ー : [ちょうおん] (n) long vowel mark (usually only used in katakana)
p = ; function p.partition( frame ) local page = frame.args; local finish = frame.args or "true" page = page:match( "^%s *(.-)%s *$" ); local tt = mw.title.new( page ); if tt == nil then return "No such page"; end local content = tt:getContent(); local result = ''; local blocks = ; local name; local current; -- Remove table confusion content = content:gsub( "", "" ); for block in content:gmatch( "%b" ) do name = block:match( "^]" ); if name ~= nil then name = name:lower(); current = blocksname ; if current == nil then current = ; end table.insert( current, block ); blocksname = current; end end local blocks2 = ; for k, v in pairs( blocks ) do table.insert( blocks2, ); end blocks = blocks2; table.sort( blocks, comp ); local count; result = "This is a template rendering profile for " .. page .. ".\n\n"; result = result .. "This tool measures the time taken for various templates on the page to be expanded and converted into wikitext " .. " (similar to the function of Special:ExpandTemplates). " .. "This only captures a portion of the total time required to render a page, but will often identify templates that render slowly. " .. "In particular, this tool does not measure the time required by the parser to convert wikitext into HTML, which may be " .. "a significant fraction of the total rendering time in many cases.\n\n" result = result .. ""; finish = finish:match( "^%s *(.-)%s *$"); if finish:lower() == 'true' then return frame:preprocess( result ); else return result; end end function p.time( frame ) local start = os.clock(); local start2 = os.time(); local test = frame.args; test = frame:preprocess( test ); local stop = os.clock(); local stop2 = os.time(); return string.format("%5.3f", stop - start); end function comp( a, b ) return #(a) > #(b); end return p 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「モジュール:RenderProfile」の詳細全文を読む スポンサード リンク
|