Added chrome extension

This commit is contained in:
Eduard Urbach 2017-07-05 04:10:19 +02:00
parent 7b611992cb
commit 0e42105049
5 changed files with 43 additions and 1 deletions

1
.gitignore vendored
View File

@ -22,6 +22,7 @@ _testmain.go
*.exe *.exe
*.test *.test
*.prof *.prof
*.pprof
# Output of the go coverage tool, specifically when used with LiteIDE # Output of the go coverage tool, specifically when used with LiteIDE
*.out *.out

View File

@ -25,3 +25,17 @@ func BenchmarkThread(b *testing.B) {
} }
}) })
} }
func BenchmarkAnimeList(b *testing.B) {
user, _ := arn.GetUser("4J6qpK1ve")
animeList := user.AnimeList()
b.ReportAllocs()
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
components.AnimeList(animeList, user, user)
}
})
}

View File

@ -56,6 +56,16 @@ component Settings(user *arn.User)
ImportLists(user) ImportLists(user)
.widget.mountable
h3.widget-title
Icon("puzzle-piece")
span Extensions
.buttons
button.action(data-action="installExtension", data-trigger="click")
Icon("chrome")
span Get the Chrome Extension
//- .widget.mountable(data-api="/api/settings/" + user.ID) //- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title //- h3.widget-title
//- Icon("cogs") //- Icon("cogs")

16
profiler.go Normal file
View File

@ -0,0 +1,16 @@
package main
func init() {
// Uncomment these if you want to enable live profiling via /debug/pprof
// app.Router.HandlerFunc("GET", "/debug/pprof/", http.HandlerFunc(pprof.Index))
// app.Router.HandlerFunc("GET", "/debug/pprof/cmdline", http.HandlerFunc(pprof.Cmdline))
// app.Router.HandlerFunc("GET", "/debug/pprof/profile", http.HandlerFunc(pprof.Profile))
// app.Router.HandlerFunc("GET", "/debug/pprof/symbol", http.HandlerFunc(pprof.Symbol))
// app.Router.HandlerFunc("GET", "/debug/pprof/trace", http.HandlerFunc(pprof.Trace))
// app.Router.Handler("GET", "/debug/pprof/goroutine", pprof.Handler("goroutine"))
// app.Router.Handler("GET", "/debug/pprof/heap", pprof.Handler("heap"))
// app.Router.Handler("GET", "/debug/pprof/threadcreate", pprof.Handler("threadcreate"))
// app.Router.Handler("GET", "/debug/pprof/block", pprof.Handler("block"))
}

View File

@ -38,4 +38,5 @@
width 100% width 100%
.widget-title .widget-title
// // We need !important here to overwrite the h3:first-child rule
margin 1rem 0 !important