Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: modify activity weight #1443

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cron/tasks/global_openrank.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const task: Task = {
const backgroundRententionFactor = 0.15;
const openrankAttenuationFactor = 0.85;
const openrankMinValue = 0.1;
const acitivityToOpenrank = activity => Math.min(1, Math.log(activity + 1) / 5);
const acitivityToOpenrank = activity => Math.min(1, Math.log(activity + 1) / 3);

const createTable = async () => {
const sql = `CREATE TABLE IF NOT EXISTS ${globalOpenrankTableName}
Expand Down
10 changes: 5 additions & 5 deletions src/metrics/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import {
} from './basic';
import * as clickhouse from '../db/clickhouse';

export const ISSUE_COMMENT_WEIGHT = 1;
export const OPEN_ISSUE_WEIGHT = 2;
export const OPEN_PULL_WEIGHT = 3;
export const REVIEW_COMMENT_WEIGHT = 4;
export const PULL_MERGED_WEIGHT = 2;
export const ISSUE_COMMENT_WEIGHT = 0.5252;
export const OPEN_ISSUE_WEIGHT = 2.2235;
export const OPEN_PULL_WEIGHT = 4.0679;
export const REVIEW_COMMENT_WEIGHT = 0.7427;
export const PULL_MERGED_WEIGHT = 2.0339;

export const getRepoOpenrank = async (config: QueryConfig) => {
config = getMergedConfig(config);
Expand Down
Loading