Add benchmarks comparison job
This commit is contained in:
parent
64b84fbe0a
commit
4e0a4754f0
2
.github/workflows/osrm-backend.yml
vendored
2
.github/workflows/osrm-backend.yml
vendored
@ -644,7 +644,7 @@ jobs:
|
||||
- name: Checkout Base Branch
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
ref: ${{ github.head_ref }} #${{ github.event.pull_request.base.ref }}
|
||||
path: base
|
||||
- name: Build Base Branch
|
||||
run: |
|
||||
|
@ -18,7 +18,7 @@ def create_markdown_table(results):
|
||||
name = result['name']
|
||||
base = result['base'].replace('\n', '<br/>')
|
||||
pr = result['pr'].replace('\n', '<br/>')
|
||||
row = f"| `{name}` | <pre>{base}</pre> | <pre>{pr}</pre> |"
|
||||
row = f"| {name} | {base} | {pr} |"
|
||||
rows.append(row)
|
||||
return f"{header}\n" + "\n".join(rows)
|
||||
|
||||
|
@ -72,10 +72,10 @@ int main(int, char **)
|
||||
|
||||
auto write_slowdown = result_packed.random_write_ms / result_plain.random_write_ms;
|
||||
auto read_slowdown = result_packed.random_read_ms / result_plain.random_read_ms;
|
||||
std::cout << "random write:\n std::vector " << result_plain.random_write_ms
|
||||
<< " ms\n util::packed_vector " << result_packed.random_write_ms << " ms\n"
|
||||
std::cout << "random write:\nstd::vector " << result_plain.random_write_ms
|
||||
<< " ms\nutil::packed_vector " << result_packed.random_write_ms << " ms\n"
|
||||
<< "slowdown: " << write_slowdown << std::endl;
|
||||
std::cout << "random read:\n std::vector " << result_plain.random_read_ms
|
||||
<< " ms\n util::packed_vector " << result_packed.random_read_ms << " ms\n"
|
||||
std::cout << "random read:\nstd::vector " << result_plain.random_read_ms
|
||||
<< " ms\nutil::packed_vector " << result_packed.random_read_ms << " ms\n"
|
||||
<< "slowdown: " << read_slowdown << std::endl;
|
||||
}
|
||||
|
@ -44,8 +44,8 @@ void benchmarkQuery(const std::vector<util::Coordinate> &queries,
|
||||
}
|
||||
TIMER_STOP(query);
|
||||
|
||||
std::cout << name << " " << TIMER_MSEC(query) << "ms"
|
||||
<< ") -> " << TIMER_MSEC(query) / queries.size() << " ms/query "
|
||||
std::cout << name << ": " << TIMER_MSEC(query) << "ms"
|
||||
<< " -> " << TIMER_MSEC(query) / queries.size() << " ms/query "
|
||||
<< "(" << TIMER_MSEC(query) << "ms"
|
||||
<< ")" << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user