src/templates/fireinfo/driver.html \
src/templates/fireinfo/index.html \
src/templates/fireinfo/i-use-1.png \
+ src/templates/fireinfo/processors.html \
src/templates/fireinfo/profile.html \
src/templates/fireinfo/releases.html \
- src/templates/fireinfo/stats-cpus-detail.html \
- src/templates/fireinfo/stats-cpus.html \
- src/templates/fireinfo/stats-geo.html \
- src/templates/fireinfo/stats.html \
src/templates/fireinfo/vendor.html \
src/templates/fireinfo/vendors.html
def get_common_cpu_flags_by_platform(self, platform, when=None):
if platform == "arm":
flags = (
- "lpae", "neon", "thumb", "thumb2", "thumbee", "vfpv3", "vfpv4",
+ "lpae", "neon", "thumb", "thumbee", "vfpv3", "vfpv4",
)
elif platform == "x86":
flags = (
"aes", "avx", "avx2", "lm", "mmx", "mmxext", "nx", "pae",
"pni", "popcnt", "sse", "sse2", "rdrand", "ssse3", "sse4a",
- "sse4_1", "sse4_2", "sha", "pclmulqdq", "rdseed",
+ "sse4_1", "sse4_2", "pclmulqdq", "rdseed",
)
else:
return
{% end %}
</dl>
+ <a class="btn btn-sm btn-light mb-3" href="/processors">
+ {{ _("Processor Features") }}
+ </a>
+
<h4>{{ _("Architectures") }}</h4>
<dl class="row">
--- /dev/null
+{% extends "../base.html" %}
+
+{% block title %}{{ _("Processors") }}{% end block %}
+
+{% block container %}
+ <section>
+ <div class="container">
+ <div class="row">
+ <div class="col-12">
+ <h1>{{ _("Processors") }}</h1>
+ </div>
+ </div>
+ </div>
+ </section>
+
+ <div class="container">
+ {% for platform in flags %}
+ <h2>{{ platform }}</h2>
+
+ <dl class="row">
+ {% for flag, percentage in flags[platform] %}
+ <dt class="col-sm-4">
+ {% if flag == "aes" %}
+ {{ _("AES Instruction Set") }}
+ {% elif flag == "avx" %}
+ {{ _("AVX") }}
+ {% elif flag == "avx2" %}
+ {{ _("AVX2") }}
+ {% elif flag == "lpae" %}
+ {{ _("LPAE") }}
+ {% elif flag == "mmx" %}
+ {{ _("MMX") }}
+ {% elif flag == "mmxext" %}
+ {{ _("MMX2") }}
+ {% elif flag == "neon" %}
+ {{ _("NEON") }}
+ {% elif flag == "nx" %}
+ {{ _("No eXecute bit") }}
+ {% elif flag == "lm" %}
+ {{ _("Supports 64 bits") }}
+ {% elif flag == "pae" %}
+ {{ _("PAE") }}
+ {% elif flag == "pclmulqdq" %}
+ {{ _("PCLMULQDQ") }}
+ {% elif flag == "pni" %}
+ {{ _("SSE3") }}
+ {% elif flag == "popcnt" %}
+ {{ _("POPCNT") }}
+ {% elif flag == "rdrand" %}
+ {{ _("RDRAND") }}
+ {% elif flag == "rdseed" %}
+ {{ _("RDSEED") }}
+ {% elif flag == "sha" %}
+ {{ _("SHA") }}
+ {% elif flag == "sse" %}
+ {{ _("SSE") }}
+ {% elif flag == "sse2" %}
+ {{ _("SSE2") }}
+ {% elif flag == "sse4a" %}
+ {{ _("SSE4a") }}
+ {% elif flag == "sse4_1" %}
+ {{ _("SSE4.1") }}
+ {% elif flag == "sse4_2" %}
+ {{ _("SSE4.2") }}
+ {% elif flag == "ssse3" %}
+ {{ _("SSSE3") }}
+ {% elif flag == "thumb" %}
+ {{ _("Thumb") }}
+ {% elif flag == "thumb2" %}
+ {{ _("Thumb2") }}
+ {% elif flag == "thumbee" %}
+ {{ _("ThumbEE") }}
+ {% elif flag == "vfpv3" %}
+ {{ _("VFPv3") }}
+ {% elif flag == "vfpv4" %}
+ {{ _("VFPv4") }}
+ {% elif flag == "virt" %}
+ {{ _("Virtualization") }}
+ {% else %}
+ {{ flag }}
+ {% end %}
+ </dt>
+
+ <dd class="col-sm-8">
+ {% if percentage >= 0.95 %}
+ {% module ProgressBar(percentage, "success") %}
+ {% elif percentage >= 0.5 %}
+ {% module ProgressBar(percentage, "warning") %}
+ {% elif percentage >= 0.1 %}
+ {% module ProgressBar(percentage, "info") %}
+ {% else %}
+ {% module ProgressBar(percentage, "danger") %}
+ {% end %}
+ </dd>
+ {% end %}
+ </dl>
+ {% end %}
+ </div>
+{% end block %}
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Processors") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>{{ _("Hardware: CPUs: %s") % platform }}</h1>
- </div>
-
- <h3>{{ _("CPU Features") }}</h3>
- <dl class="dl-horizontal">
- {% for flag, percentage in flags %}
- {% if percentage >= 0.01 %}
- <dt>
- {% if flag == "aes" %}
- {{ _("AES Instruction Set") }}
- {% elif flag == "avx" %}
- {{ _("AVX") }}
- {% elif flag == "avx2" %}
- {{ _("AVX2") }}
- {% elif flag == "lpae" %}
- {{ _("LPAE") }}
- {% elif flag == "mmx" %}
- {{ _("MMX") }}
- {% elif flag == "mmxext" %}
- {{ _("MMX2") }}
- {% elif flag == "neon" %}
- {{ _("NEON") }}
- {% elif flag == "nx" %}
- {{ _("No eXecute bit") }}
- {% elif flag == "lm" %}
- {{ _("Supports 64 bits") }}
- {% elif flag == "pae" %}
- {{ _("PAE") }}
- {% elif flag == "pclmulqdq" %}
- {{ _("PCLMULQDQ") }}
- {% elif flag == "pni" %}
- {{ _("SSE3") }}
- {% elif flag == "popcnt" %}
- {{ _("POPCNT") }}
- {% elif flag == "rdrand" %}
- {{ _("RDRAND") }}
- {% elif flag == "rdseed" %}
- {{ _("RDSEED") }}
- {% elif flag == "sha" %}
- {{ _("SHA") }}
- {% elif flag == "sse" %}
- {{ _("SSE") }}
- {% elif flag == "sse2" %}
- {{ _("SSE2") }}
- {% elif flag == "sse4a" %}
- {{ _("SSE4a") }}
- {% elif flag == "sse4_1" %}
- {{ _("SSE4.1") }}
- {% elif flag == "sse4_2" %}
- {{ _("SSE4.2") }}
- {% elif flag == "ssse3" %}
- {{ _("SSSE3") }}
- {% elif flag == "thumb" %}
- {{ _("Thumb") }}
- {% elif flag == "thumb2" %}
- {{ _("Thumb2") }}
- {% elif flag == "thumbee" %}
- {{ _("ThumbEE") }}
- {% elif flag == "vfpv3" %}
- {{ _("VFPv3") }}
- {% elif flag == "vfpv4" %}
- {{ _("VFPv4") }}
- {% elif flag == "virt" %}
- {{ _("Virtualization") }}
- {% else %}
- {{ flag }}
- {% end %}
- </dt>
- <dd>
- {% if percentage >= 0.95 %}
- {% module ProgressBar(percentage, "success") %}
- {% elif percentage >= 0.5 %}
- {% module ProgressBar(percentage, "warning") %}
- {% elif percentage >= 0.1 %}
- {% module ProgressBar(percentage, "info") %}
- {% else %}
- {% module ProgressBar(percentage, "danger") %}
- {% end %}
- </dd>
- {% end %}
- {% end %}
- </dl>
-{% end block %}
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Processors") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>{{ _("Hardware: CPUs") }}</h1>
- </div>
-
- <div class="row">
- <div class="col-md-2 col-md-offset-2 ac">
- <small class="text-muted">({{ _("minimum") }})</small>
- <h3>{{ "%.0f" % clock_speed_min }} {{ _("MHz") }}</h3>
- </div>
- <div class="col-md-4 ac">
- <small class="text-muted">({{ _("average") }})</small>
- <h1 class="text-success">{{ "%.0f" % clock_speed_avg }} {{ _("MHz") }}</h1>
- </div>
- <div class="col-md-2 ac">
- <small class="text-muted">({{ _("maximum") }})</small>
- <h3>{{ "%.0f" % clock_speed_max }} {{ _("MHz") }}</h3>
- </div>
- </div>
-
- <div class="ac">
- <ul class="list-inline">
- <li>{{ _("CPU Features") }}:</li>
- {% for platform in ("x86", "arm") %}
- <li>
- <a href="/statistics/processors/{{ platform }}">{{ platform }}</a>
- </li>
- {% end %}
- </ul>
- </div>
-
- <hr>
-
- <h3>{{ _("Vendors") }}</h3>
- <p>
- This chart shows us which vendors is the most favorite for the CPUs
- used in IPFire.
- </p>
-
- <dl class="dl-horizontal">
- {% for vendor, percentage in cpu_vendors %}
- <dt>{{ vendor }}</dt>
- <dd>{% module ProgressBar(percentage) %}</dd>
- {% end %}
- </dl>
-
- <h3>{{ _("Architectures") }}</h3>
- <dl class="dl-horizontal">
- {% for name, percentage in arch_map %}
- <dt>{{ name }}</dt>
- <dd>{% module ProgressBar(percentage) %}</dd>
- {% end %}
- </dl>
-{% end block %}
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Geo Locations") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>{{ _("Geo Locations") }}</h1>
- </div>
-
- <div class="row">
- <div class="col-lg-12 col-md-12">
- <p>
- This chart shows us in which country IPFire is running.
- </p>
-
- {% module FireinfoGeoTable(geo_locations) %}
- </div>
- </div>
-{% end block %}
+++ /dev/null
-{% extends "../base.html" %}
-
-{% block title %}{{ _("Statistics") }}{% end block %}
-
-{% block body %}
- <div class="page-header">
- <h1>{{ _("fireinfo statistics") }}</h1>
- </div>
-
- <div class="row">
- <div class="col-md-6">
- <div class="thumbnail ac">
- <img src="{{ static_url("images/tux/ipfire_tux_256x256.png") }}" alt="">
-
- <h3>
- <a href="/statistics/releases">{{ _("IPFire Releases") }}</a>
- </h3>
- </div>
- </div>
-
- <div class="col-md-6">
- <div class="thumbnail ac">
- <h2 class="ac">{{ _("Hardware") }}</h2>
-
- <h4>
- <a href="/statistics/processors">{{ _("Processors") }}</a>
- </h4>
- </div>
-
- <div class="thumbnail ac">
- <h2 class="ac">{{ _("Others") }}</h2>
-
- <h4>
- <a href="/statistics/geo-locations">{{ _("Geo Locations") }}</a>
- </h4>
- </div>
- </div>
- </div>
-{% end block %}
(r"/profile/([a-z0-9]{40})", fireinfo.ProfileHandler),
# Stats
+ (r"/processors", fireinfo.ProcessorsHandler),
(r"/releases", fireinfo.ReleasesHandler),
- # Send profiles.
+ # Send profiles
(r"/send/([a-z0-9]+)", fireinfo.ProfileSendHandler),
-
- # Stats handlers
- (r"/statistics", fireinfo.StatsHandler),
- (r"/statistics/processors", fireinfo.StatsProcessorsHandler),
- (r"/statistics/processors/(arm|x86)", fireinfo.StatsProcessorDetailHandler),
])
# i-use.ipfire.org
return self.render("fireinfo/releases.html", **data)
-class StatsHandler(BaseHandler):
+class ProcessorsHandler(BaseHandler):
def get(self):
- self.render("fireinfo/stats.html")
+ flags = {}
+ for platform in ("arm", "x86"):
+ flags[platform] = \
+ self.fireinfo.get_common_cpu_flags_by_platform(platform, when=self.when)
-class StatsProcessorsHandler(BaseHandler):
- def get(self):
- avg, stddev, min, max = self.fireinfo.get_cpu_clock_speeds(when=self.when)
- arch_map = self.fireinfo.get_arch_map(when=self.when)
-
- data = {
- "arch_map" : arch_map,
- "cpu_vendors" : self.fireinfo.get_cpu_vendors_map(when=self.when),
- "clock_speed_avg" : avg,
- "clock_speed_stddev" : stddev,
- "clock_speed_min" : min,
- "clock_speed_max" : max,
- }
-
- return self.render("fireinfo/stats-cpus.html", **data)
-
-
-class StatsProcessorDetailHandler(BaseHandler):
- def get(self, platform):
- assert platform in ("arm", "x86")
-
- flags = self.fireinfo.get_common_cpu_flags_by_platform(platform, when=self.when)
+ # Cache for 1h
+ self.set_expires(3600)
- return self.render("fireinfo/stats-cpus-detail.html",
- platform=platform, flags=flags)
+ return self.render("fireinfo/processors.html", flags=flags)
class VendorsHandler(BaseHandler):