Description:
add thousand separater for mem reportt
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r439:22297d4b2aee - - 2 files changed: 3 inserted, 3 deleted
@@ -1,31 +1,31 | |||
|
1 | 1 | %style{type: "text/css"} |
|
2 | 2 | = @css_style |
|
3 | 3 | |
|
4 | 4 | %h1= "Submission: #{@submission.id}" |
|
5 | 5 | |
|
6 | 6 | %p |
|
7 | 7 | User: |
|
8 | 8 | = "(#{@submission.user.login}) #{@submission.user.full_name}" |
|
9 | 9 | %br/ |
|
10 | 10 | Problem: |
|
11 | 11 | - if @submission.problem!=nil |
|
12 | 12 | = "(#{@submission.problem.name}) #{@submission.problem.full_name}" |
|
13 | 13 | - else |
|
14 | 14 | = "(n/a)" |
|
15 | 15 | %br/ |
|
16 | 16 | = "Number: #{@submission.number}" |
|
17 | 17 | %br/ |
|
18 | 18 | = "Submitted: #{time_ago_in_words(@submission.submitted_at)} ago (at #{@submission.submitted_at.to_formatted_s(:long)})" |
|
19 | 19 | %br/ |
|
20 | 20 | = "Points: #{@submission.points}/#{@submission.problem.full_score}" |
|
21 | 21 | %br/ |
|
22 | 22 | = "Comment: #{@submission.grader_comment}" |
|
23 | 23 | %br/ |
|
24 |
- = "Runtime ( |
|
|
24 | + = "Runtime (s): #{@submission.max_runtime}" | |
|
25 | 25 | %br/ |
|
26 | - = "Memory (kb): #{@submission.peak_memory}" | |
|
26 | + = "Memory (kb): #{number_with_delimiter(@submission.peak_memory)}" | |
|
27 | 27 | |
|
28 | 28 | %b Source code (first 10kb) |
|
29 | 29 | //%div.highlight{:style => "border: 1px solid black;"} |
|
30 | 30 | =@formatted_code.html_safe |
|
31 | 31 |
@@ -42,38 +42,38 | |||
|
42 | 42 | %p |
|
43 | 43 | This counts only for submission with 100% score <br/> |
|
44 | 44 | Right now, java is excluded from memory usage competition. (Because it always uses 2GB memory...) |
|
45 | 45 | |
|
46 | 46 | %h2 By language |
|
47 | 47 | |
|
48 | 48 | %table.info |
|
49 | 49 | %thead |
|
50 | 50 | %tr.info-head |
|
51 | 51 | %th Language |
|
52 | 52 | %th Best runtime (ms) |
|
53 | 53 | %th Best memory (kbytes) |
|
54 | 54 | %th Shortest Code (bytes) |
|
55 | 55 | %th First solver |
|
56 | 56 | %tbody |
|
57 | 57 | - @by_lang.each do |lang,value| |
|
58 | 58 | %tr{class: cycle('info-even','info-odd')} |
|
59 | 59 | %td= lang |
|
60 | 60 | %td |
|
61 | 61 | = link_to value[:runtime][:user], controller: 'users', action: 'profile', id: value[:runtime][:user_id] |
|
62 | 62 | = "(#{(value[:runtime][:value] * 1000).to_i} @" |
|
63 | 63 | = "#{link_to("#" + value[:runtime][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:runtime][:sub_id])} )".html_safe |
|
64 | 64 | %td |
|
65 | 65 | = link_to value[:memory][:user], controller: 'users', action: 'profile', id: value[:memory][:user_id] |
|
66 | - = "(#{value[:memory][:value]} @" | |
|
66 | + = "(#{number_with_delimiter(value[:memory][:value])} @" | |
|
67 | 67 | = "#{link_to("#" + value[:memory][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:memory][:sub_id])} )".html_safe |
|
68 | 68 | %td |
|
69 | 69 | = link_to value[:length][:user], controller: 'users', action: 'profile', id: value[:length][:user_id] |
|
70 | 70 | = "(#{value[:length][:value]} @" |
|
71 | 71 | = "#{link_to("#" + value[:length][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:length][:sub_id])} )".html_safe |
|
72 | 72 | %td |
|
73 | 73 | - if value[:first][:user] != '(NULL)' #TODO: i know... this is wrong... |
|
74 | 74 | = link_to value[:first][:user], controller: 'users', action: 'profile', id: value[:first][:user_id] |
|
75 | 75 | = "(#{value[:first][:value]} @" |
|
76 | 76 | = "#{link_to("#" + value[:first][:sub_id].to_s, controller: 'graders' , action: 'submission', id: value[:first][:sub_id])} )".html_safe |
|
77 | 77 | |
|
78 | 78 | - else |
|
79 | 79 | %h3 No submissions |
You need to be logged in to leave comments.
Login now