1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00

add git.hook

This commit is contained in:
shaoying 2018-11-09 12:17:54 +08:00
parent d52c7ce33e
commit f5ad8da0a5
3 changed files with 8 additions and 6 deletions

View File

@ -174,11 +174,10 @@ command! NN call ColorNext()<CR>
" autocmd BufReadPost * call NCount("~/.nwrite")
"
let g:bench_code = "http://localhost:9094/code/"
function! BenchCode(path, args)
exe "silent !bench web.get " . g:bench_code . a:path . " " . join(a:args, " ")
function! BenchCode(cmd, arg)
exe "silent !bench web.code." . a:cmd . " " . join(a:arg, " ")
endfunction
autocmd FileReadPost * call BenchCode("counter", ["name", "nopen", "count", 1])
autocmd FileWritePost * call BenchCode("counter", ["name", "nsave", "count", 1])
" autocmd BufReadPost * call BenchCode("counter", ["nopen", 1])
autocmd BufWritePost * call BenchCode("counter", ["nsave", 1])
"}}}

View File

@ -106,3 +106,7 @@ bindkey "^P" up-line-or-beginning-search
bindkey -M vicmd j down-line-or-beginning-search
bindkey -M vicmd k up-line-or-beginning-search
preexec() {
bench web.code.counter nexec 1
}

View File

@ -199,7 +199,6 @@ var Index = &ctx.Context{Name: "mdb", Help: "数据中心",
"extra_field": 2, "extra_fields": 1, "extra_format": 1, "trans_field": 1, "trans_map": 2},
Hand: func(m *ctx.Message, c *ctx.Context, key string, arg ...string) {
if _, ok := m.Target().Server.(*MDB); m.Assert(ok) {
table := m.Confx("table", arg, 0)
if v := m.Confv("tables", table); v != nil {
table = v.(string)