fix: skip null rows when parsing pool metrics CSV
This commit is contained in:
parent
5965ce682d
commit
3f73bf6203
13 changed files with 21 additions and 21 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
4.2.19
|
||||
4.2.20
|
||||
|
|
|
|||
|
|
@ -6013,7 +6013,7 @@ void print_usage(const char *prog) {
|
|||
* ============================================================================ */
|
||||
|
||||
const char *unsandbox_version(void) {
|
||||
return "4.2.19";
|
||||
return "4.2.20";
|
||||
}
|
||||
|
||||
const char *unsandbox_detect_language(const char *filename) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
* </ol>
|
||||
*
|
||||
* @author Permacomputer Project
|
||||
* @version 4.2.19
|
||||
* @version 4.2.20
|
||||
*/
|
||||
|
||||
import javax.crypto.Mac
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "un-async",
|
||||
"version": "4.2.19",
|
||||
"version": "4.2.20",
|
||||
"description": "Unsandbox async JavaScript SDK - Execute code in 50+ languages",
|
||||
"main": "src/un_async.js",
|
||||
"type": "module",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "un-sync",
|
||||
"version": "4.2.19",
|
||||
"version": "4.2.20",
|
||||
"description": "unsandbox.com JavaScript SDK (Isomorphic - Node.js + Browser)",
|
||||
"type": "module",
|
||||
"main": "src/un.js",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ local ltn12 = require("ltn12")
|
|||
|
||||
local Un = {}
|
||||
Un.API_BASE = "https://api.unsandbox.com"
|
||||
Un.VERSION = "4.2.19"
|
||||
Un.VERSION = "4.2.20"
|
||||
|
||||
-- Credential loading
|
||||
function Un.load_accounts_csv(path)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ use Digest::HMAC_SHA256 qw(hmac_sha256_hex);
|
|||
use File::HomeDir;
|
||||
use Time::HiRes qw(time sleep);
|
||||
|
||||
our $VERSION = "4.2.19";
|
||||
our $VERSION = "4.2.20";
|
||||
our $API_BASE = 'https://api.unsandbox.com';
|
||||
|
||||
# Credential system
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ from setuptools import setup, find_packages
|
|||
|
||||
setup(
|
||||
name="unsandbox-async",
|
||||
version="4.2.19",
|
||||
version="4.2.20",
|
||||
description="Asynchronous Python SDK for unsandbox.com code execution",
|
||||
long_description=open("README.md").read() if False else "Async Python SDK for unsandbox code execution",
|
||||
author="unsandbox.com",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
|
|||
|
||||
setup(
|
||||
name="unsandbox",
|
||||
version="4.2.19",
|
||||
version="4.2.20",
|
||||
author="Unsandbox",
|
||||
description="Synchronous Python SDK for unsandbox.com code execution",
|
||||
long_description=long_description,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ from .un import (
|
|||
CredentialsError,
|
||||
)
|
||||
|
||||
__version__ = "4.2.19"
|
||||
__version__ = "4.2.20"
|
||||
__all__ = [
|
||||
"execute_code",
|
||||
"execute_async",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[package]
|
||||
name = "un-async"
|
||||
version = "4.2.19"
|
||||
version = "4.2.20"
|
||||
edition = "2021"
|
||||
authors = ["unsandbox.com"]
|
||||
description = "Asynchronous Rust SDK for unsandbox.com secure code execution API"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
[package]
|
||||
name = "un-sync"
|
||||
version = "4.2.19"
|
||||
version = "4.2.20"
|
||||
edition = "2021"
|
||||
authors = ["unsandbox.com"]
|
||||
description = "Synchronous Rust SDK for unsandbox.com secure code execution API"
|
||||
|
|
|
|||
|
|
@ -175,14 +175,14 @@ report = {
|
|||
|
||||
# Parse per-pool time series if available
|
||||
if pools_csv:
|
||||
try:
|
||||
import os
|
||||
if os.path.exists(pools_csv):
|
||||
with open(pools_csv) as f:
|
||||
next(f) # skip header
|
||||
for line in f:
|
||||
import os
|
||||
if os.path.exists(pools_csv):
|
||||
with open(pools_csv) as f:
|
||||
next(f) # skip header
|
||||
for line in f:
|
||||
try:
|
||||
parts = line.strip().split(',')
|
||||
if len(parts) >= 8:
|
||||
if len(parts) >= 8 and parts[2] != 'null':
|
||||
pool_id = parts[1]
|
||||
if pool_id not in pool_samples:
|
||||
pool_samples[pool_id] = {"load1": [], "load5": [], "load15": [], "available": [], "total": []}
|
||||
|
|
@ -191,8 +191,8 @@ if pools_csv:
|
|||
pool_samples[pool_id]["load15"].append(float(parts[4]))
|
||||
pool_samples[pool_id]["available"].append(int(parts[5]))
|
||||
pool_samples[pool_id]["total"].append(int(parts[6]))
|
||||
except Exception as e:
|
||||
print(f"Warning: Could not parse pools CSV: {e}")
|
||||
except (ValueError, IndexError):
|
||||
continue # Skip invalid rows
|
||||
|
||||
# Add pool breakdown with time series stats
|
||||
if pool_samples:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue