Skip to content

Commit 49a86da

Browse files
committed
disable static 410681
1 parent cb5373d commit 49a86da

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

admin/config/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ http {
6969
location /css/ {
7070
# set max-age=1year
7171
expires 31536000s;
72-
alias /home/ishocon/webapp/ruby/public/css/;
72+
alias /home/ishocon/webapp/go/public/css/;
7373
}
7474

7575
location / {

note.go.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,18 @@ docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443 --workload 7"
179179
2024/01/10 11:36:30 投票者の感心がなくなりました
180180
2024/01/10 11:36:30 {"score": 422739, "success": 293819, "failure": 0}
181181
```
182+
183+
disable static 410681
184+
185+
```
186+
❯ make bench
187+
docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443 --workload 7"
188+
2024/01/10 12:11:46 Start GET /initialize
189+
2024/01/10 12:11:46 期日前投票を開始します
190+
2024/01/10 12:11:46 期日前投票が終了しました
191+
2024/01/10 12:11:46 投票を開始します Workload: 7
192+
2024/01/10 12:12:31 投票が終了しました
193+
2024/01/10 12:12:31 投票者が結果を確認しています
194+
2024/01/10 12:12:46 投票者の感心がなくなりました
195+
2024/01/10 12:12:46 {"score": 410681, "success": 280665, "failure": 0}
196+
```

webapp/go/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"database/sql"
55
"github.com/gin-contrib/multitemplate"
66
"html/template"
7-
// "log"
87
"net/http"
98
"os"
109
"path/filepath"
@@ -13,7 +12,6 @@ import (
1312
"strings"
1413

1514
"github.com/gin-gonic/contrib/sessions"
16-
"github.com/gin-gonic/contrib/static"
1715
"github.com/gin-gonic/gin"
1816
_ "github.com/go-sql-driver/mysql"
1917
)
@@ -56,8 +54,8 @@ func main() {
5654

5755
gin.SetMode(gin.ReleaseMode)
5856
r := gin.New()
57+
//r := gin.Default()
5958
r.Use(gin.Recovery())
60-
r.Use(static.Serve("/css", static.LocalFile("public/css", true)))
6159

6260
r.HTMLRender = createRender()
6361

@@ -239,6 +237,7 @@ func main() {
239237

240238
r.GET("/initialize", func(c *gin.Context) {
241239
db.Exec("DELETE FROM votes")
240+
db.Exec("DELETE FROM candidate_keywords")
242241

243242
c.String(http.StatusOK, "Finish")
244243
})

0 commit comments

Comments
 (0)