-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/fix webapp bottolenecks4 (#139)
* report_count廃止 * fix nobody function * viewers_count廃止 * Id -> ID * ライブコメントとリアクションの初期データ追加 * 統計情報修正
- Loading branch information
Showing
25 changed files
with
202,206 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package isupipe | ||
|
||
import ( | ||
"context" | ||
"log" | ||
"testing" | ||
"time" | ||
|
||
"github.com/isucon/isucandar/agent" | ||
"github.com/isucon/isucon13/bench/internal/config" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
client, err := NewClient( | ||
agent.WithBaseURL(config.TargetBaseURL), | ||
agent.WithTimeout(1*time.Minute), | ||
) | ||
if err != nil { | ||
log.Fatalln(err) | ||
} | ||
|
||
if _, err := client.Initialize(context.Background()); err != nil { | ||
log.Fatalln(err) | ||
} | ||
|
||
m.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 移植マニュアル | ||
|
||
|
||
## Webappについて | ||
|
||
|
||
|
||
|
||
## self-hosted runnerについて | ||
|
||
|
||
|
||
|
||
## 関連するミドルウェアについて | ||
|
||
|
||
|
||
|
||
## CI実行方法について | ||
|
||
|
||
|
||
|
||
## ベンチマーカーで発生するエラーについて | ||
|
||
エラーには以下のような種類があります | ||
|
||
うち、移植失敗の可能性を示唆するものは以下のとおりです |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import random | ||
|
||
N = 100000 | ||
|
||
SQL_FORMAT = "\t(1, 1, '{comment}'),\n" | ||
|
||
|
||
|
||
with open('./initial-data/positive_sentence.txt', 'r') as f: | ||
livecomments = list(line.rstrip() for line in f.readlines()) | ||
|
||
with open('/tmp/livecomments.sql', 'w') as f: | ||
f.write("INSERT INTO livecomments (user_id, livestream_id, comment)\n") | ||
f.write("VALUES\n") | ||
for _ in range(N): | ||
comment = random.choice(livecomments) | ||
sql = SQL_FORMAT.format(comment=comment) | ||
f.write(sql) | ||
f.write("\t(1, 1, 'こんにちは');\n") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import random | ||
|
||
N = 100000 | ||
|
||
|
||
SQL_FORMAT = "\t('{emoji_name}', 1, 1),\n" | ||
|
||
with open('./initial-data/emoji.txt', 'r') as f: | ||
emoji_list = list(line.rstrip() for line in f.readlines()) | ||
|
||
|
||
with open('/tmp/reactions.sql', 'w') as f: | ||
f.write('INSERT INTO reactions (emoji_name, user_id, livestream_id)\n') | ||
f.write('VALUES\n') | ||
for _ in range(N): | ||
emoji_name = random.choice(emoji_list) | ||
sql = SQL_FORMAT.format(emoji_name=emoji_name) | ||
f.write(sql) | ||
f.write("\t('+1', 1, 1);\n") |
Oops, something went wrong.