datasette: baked queries for pname, version, & platform stats
This commit is contained in:
parent
5f598ece03
commit
dc0fbe6242
4 changed files with 206 additions and 32 deletions
44
default.nix
44
default.nix
|
@ -88,7 +88,7 @@ lib.makeScope pkgs.newScope (
|
|||
datasette-settings = self.callPackage (
|
||||
{ formats }:
|
||||
(formats.json { }).generate "datasette-settings.json" {
|
||||
sql_time_limit_ms = 8000;
|
||||
sql_time_limit_ms = 16000;
|
||||
}
|
||||
) { };
|
||||
datasette-metadata = self.callPackage (
|
||||
|
@ -122,38 +122,18 @@ lib.makeScope pkgs.newScope (
|
|||
<code>CudaArtifact</code>s (identified by <code>sha256</code>)
|
||||
claiming the same <code>(pname, version, platform)</code> triple
|
||||
'';
|
||||
sql = ''
|
||||
SELECT
|
||||
COUNT(DISTINCT sha256) AS conflicts,
|
||||
pname.str AS pname,
|
||||
ver.str AS ver,
|
||||
plat.str AS plat,
|
||||
GROUP_CONCAT(name.str, char(10)) AS name,
|
||||
GROUP_CONCAT(tag.str, char(10)) AS tag,
|
||||
GROUP_CONCAT(h.hash, char(10)) AS sha256
|
||||
FROM
|
||||
(
|
||||
CudaArtifact AS cc,
|
||||
Str AS name,
|
||||
Str AS pname,
|
||||
Str as ver,
|
||||
Str as plat,
|
||||
Hash as h
|
||||
ON cc.name=name.id
|
||||
AND cc.pname=pname.id
|
||||
AND cc.version = ver.id
|
||||
AND cc.platform = plat.id
|
||||
AND cc.sha256 = h.id
|
||||
)
|
||||
LEFT JOIN Str AS tag
|
||||
ON
|
||||
cc.compat_tag=tag.id
|
||||
GROUP BY
|
||||
cc.pname, cc.version, cc.platform
|
||||
HAVING
|
||||
conflicts >= CAST(:min_conflicts AS INTEGER)
|
||||
ORDER BY conflicts DESC
|
||||
sql = builtins.readFile ./src/q/summary-cuda-conflicts.sql;
|
||||
};
|
||||
queries.cuda_pnames = {
|
||||
title = "Known CUDA Artifacts";
|
||||
description_html = ''
|
||||
Overview of known CUDA artifacts sorted by <code>pname</code>
|
||||
'';
|
||||
sql = builtins.readFile ./src/q/summary-cuda-pnames.sql;
|
||||
};
|
||||
queries.cuda_platforms = {
|
||||
title = "CUDA: Supported Platforms ";
|
||||
sql = builtins.readFile ./src/q/summary-cuda-platforms.sql;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue