File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 69
69
location /css/ {
70
70
# set max-age=1year
71
71
expires 31536000s ;
72
- alias /home/ishocon/webapp/ruby /public/css/;
72
+ alias /home/ishocon/webapp/go /public/css/;
73
73
}
74
74
75
75
location / {
Original file line number Diff line number Diff line change @@ -179,3 +179,18 @@ docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443 --workload 7"
179
179
2024/01/10 11:36:30 投票者の感心がなくなりました
180
180
2024/01/10 11:36:30 {"score": 422739, "success": 293819, "failure": 0}
181
181
```
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
+ ```
Original file line number Diff line number Diff line change 4
4
"database/sql"
5
5
"github.com/gin-contrib/multitemplate"
6
6
"html/template"
7
- // "log"
8
7
"net/http"
9
8
"os"
10
9
"path/filepath"
@@ -13,7 +12,6 @@ import (
13
12
"strings"
14
13
15
14
"github.com/gin-gonic/contrib/sessions"
16
- "github.com/gin-gonic/contrib/static"
17
15
"github.com/gin-gonic/gin"
18
16
_ "github.com/go-sql-driver/mysql"
19
17
)
@@ -56,8 +54,8 @@ func main() {
56
54
57
55
gin .SetMode (gin .ReleaseMode )
58
56
r := gin .New ()
57
+ //r := gin.Default()
59
58
r .Use (gin .Recovery ())
60
- r .Use (static .Serve ("/css" , static .LocalFile ("public/css" , true )))
61
59
62
60
r .HTMLRender = createRender ()
63
61
@@ -239,6 +237,7 @@ func main() {
239
237
240
238
r .GET ("/initialize" , func (c * gin.Context ) {
241
239
db .Exec ("DELETE FROM votes" )
240
+ db .Exec ("DELETE FROM candidate_keywords" )
242
241
243
242
c .String (http .StatusOK , "Finish" )
244
243
})
You can’t perform that action at this time.
0 commit comments