1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/highlight.js/lib/languages/profile.js

44 lines
889 B
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
Language: Python profiler
Description: Python profiler results
Author: Brian Beck <exogen@gmail.com>
*/
function profile(hljs) {
2023-12-18 13:12:25 +08:00
return {
2024-01-16 21:26:16 +08:00
name: 'Python profiler',
2023-12-18 13:12:25 +08:00
contains: [
hljs.C_NUMBER_MODE,
{
2024-01-16 21:26:16 +08:00
begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}',
end: ':',
2023-12-18 13:12:25 +08:00
excludeEnd: true
},
{
2024-01-16 21:26:16 +08:00
begin: '(ncalls|tottime|cumtime)',
end: '$',
2023-12-18 13:12:25 +08:00
keywords: 'ncalls tottime|10 cumtime|10 filename',
relevance: 10
},
{
2024-01-16 21:26:16 +08:00
begin: 'function calls',
end: '$',
contains: [ hljs.C_NUMBER_MODE ],
2023-12-18 13:12:25 +08:00
relevance: 10
},
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'string',
2024-01-16 21:26:16 +08:00
begin: '\\(',
end: '\\)$',
excludeBegin: true,
excludeEnd: true,
2023-12-18 13:12:25 +08:00
relevance: 0
}
]
};
2024-01-16 21:26:16 +08:00
}
module.exports = profile;